Reader small image

You're reading from  MicroPython Projects

Product typeBook
Published inApr 2020
Reading LevelExpert
PublisherPackt
ISBN-139781789958034
Edition1st Edition
Languages
Right arrow
Author (1)
Jacob Beningo
Jacob Beningo
author image
Jacob Beningo

Jacob Beningo is an independent consultant who specializes in microcontroller-based embedded systems. He has advised, coached, and developed systems across multiple industries, including the automotive, defense, industrial, medical, and space sectors. Jacob enjoys working with companies to help them develop and improve their processes and skill sets. He publishes a monthly newsletter, Embedded Bytes, and blogs for publications about embedded system design techniques and challenges. Jacob holds bachelor's degrees in electrical engineering, physics, and mathematics from Central Michigan University and a master's degree in space systems engineering from the University of Michigan.
Read more about Jacob Beningo

Right arrow

Assessments

Chapter 1

  1. What Python features make it a competitive choice for use in embedded systems?
    • It's taught at many universities around the world.
    • It's easy to learn (I've seen elementary students write Python code).
    • It is object oriented.
    • It is an interpreted scripting language, which removes compilation.
    • It's supported by a robust community, including many add-on libraries, which minimizes the need to re-invent the wheel.
    • It includes error handling (something that C didn't get the memo on).
    • It's easily extensible.
  2. Which three use cases does MicroPython match well with?
    • DIY projects
    • Rapid prototyping
    • Low-volume production products
  3. What business ramifications should be evaluated for using MicroPython?
    • Risk tolerance for security vulnerabilities
    • Cost savings from needing fewer embedded developers
    • Impact on time-to-market
    • Overall system quality and...

Chapter 2

  1. What characteristics define a real-time embedded system?
    • They are event driven and do not poll inputs.
    • They are deterministic; given the same initial conditions, they produce the same outputs in the same time frame.
    • They are often resource constrained in some manner, such as the following:
      • Clock speed
      • Memory
      • Energy consumption
    • The use of a dedicated microcontroller-based processor.
    • May have a RTOS to manage system tasks.
  2. What four scheduling algorithms are commonly used with MicroPython?
    • Round robin scheduling
    • Periodic scheduling using timers
    • Cooperative scheduling
    • MicroPython threads
  1. What best practices should a developer follow when using callbacks in MicroPython?
    • Keep interrupt service routines (ISRs) short and fast.
    • Perform measurements to understand interrupt timing and latency.
    • Use interrupt priority settings to emulate preemption.
    • Make sure task variables...

Chapter 3

  1. What is a high-level system diagram called?
    • A block diagram
  2. What is a detailed hardware diagram called?
    • A schematic or wiring diagram
  3. What three diagrams did we use in this chapter to define our software architecture?
    • An application flowchart
    • A state diagram
    • A class diagram
  4. What is it called when two classes are connected together without the use of the inheritance mechanism?
    • Composition
  5. What information should be included in a test case?
    • The test case number.
    • The test case objective (why are we doing the test?)
    • Conditions that need to occur before the test is performed.
    • Input that needs to be applied to the system during testing (push a button).
    • Expected results (what should we see happen?)
    • Who did the testing? (yes, who can we blame if we discover a problem in the future?)
    • When was the test performed?
    • The software version number that the test is to be...

Chapter 4

  1. What are the three main components that are part of nearly every test harness?
    • A test execution engine
    • A repository of tests
    • A test reporting mechanism
  2. What are the advantages of using a test harness?
    • Automating testing, which then frees up developers to focus on other activities.
    • Performing regression testing, which can verify that recent changes haven't broken other pieces of code.
    • Increased code quality.
  3. What are a few examples of faults that we would want a test harness to test for?
    • Non-responsive slave device
    • Invalid response
    • I2C bus errors
  4. What are some of the architectures that a test harness can follow?
    • PC to embedded device
    • Embedded device monitor to embedded device target
    • Self-contained embedded device target and tester
  5. What are the four operations that we need our module tests to perform?
    • Test setup
    • Test execution
    • Test cleanup
    • Test reporting...

Chapter 5

  1. In which folder in the kernel can you find all the MicroPython-supported architectures?
    • The ports/ folder
  2. Which microcontroller architecture has the most supported development boards?
    • STM32
  3. What three types of files can be found in a development board's board folder?
    • Supported board folders
    • STM32 derivative linker files
    • STM32 derivative pin maps
  4. What are a few features that make the STM32L475E_IOT01A board interesting for MicroPython?
    • Arduino headers
    • On-board Wi-Fi
    • On-board Bluetooth
    • A built-in DFU bootloader
    • The PMOD expansion header
  5. Which board kernel file can be modified to change the pin designation that is used to control a pin in a MicroPython script?
    • pins.csv
  6. What function must be defined in order to customize the startup code initialization?
    • MICRO_BOARD_EARLY_INIT
  7. What steps should be followed to customize the startup code?
    1. Update the...

Chapter 6

  1. What files is used to modify what USB classes are supported on startup by the MicroPython board?
    • boot.py
  2. What are some reasons we would use generated data in our development rather than a live sensor?
    • Less code to write initially
    • No need to troubleshoot sensor code
    • A simpler hardware setup
  3. At what chart refresh rate does the user interface start to become sluggish?
    • 100 milliseconds
  4. What are some reasons for using the MicroPython UART for communication over using USB?
    • It's useful to gain experience with the UART, which can be used to interface with other sensors and devices.
  1. What Python function is used to convert a floating-point number into a string?
    • str()
  2. What module is used to create command-line arguments?
    • args
  3. What are some new features that could be added to the visualizer to enhance its capabilities?
    • Add a configuration file.
    • Add a data...

Chapter 7

  1. What are the technologies that are typically used in gesture-control applications?
    • IR LEDs and photodiodes
    • Cameras
  2. What four main gestures were covered in this chapter?
    • Forward
    • Backward
    • Left
    • Right
  3. What three analog engines are provided in the APDS-9660?
    • Proximity detection
    • Gesture detection
    • RGB color detection
  4. What is the difference between a driver and an integrated application module?
    • A driver provides access to all functionality within a chip for use generically by the application. A driver requires a developer to create a higher-level module to use the data from the driver to perform useful work. An integrated application module integrates some driver functionality into the application module so that they are highly integrated and coupled together.
  1. What method was used to determine the gesture direction?
    • Using four of the last five data points with...

Chapter 8

  1. What library do we use to create tasks within MicroPython?
    • uasyncio
  2. What MicroPython image do we use when flashing the ESP32?
    • Generic-SPIRAM with support for BLE but no LAN or PPP
  3. What tool is used to flash the ESP32 with MicroPython?
    • esptool.py
  4. Which MicroPython module can be used to generically control I/O across any MicroPython port?
    • machine
  5. What methods can be used to push scripts to the ESP32?
    • WebREPL
    • Anaconda terminal

Chapter 9

  1. What skill areas are traditionally covered within embedded systems?
    • Architecture design
    • Code analysis
    • Defect management/debugging
    • Documentation
    • Language skills
    • Processes and standards
    • Testing tools
  1. Why are intelligent systems now required in the industry?
    • To solve problems that are not easy for a human to code for
    • To scale system behaviors and results based on new data and situations
    • To perform tasks that are easy for a human but traditionally difficult for computers
    • To decrease system costs in certain applications
    • And because it's cool and cutting edge
  2. What are the benefits of moving machine learning from the cloud to the edge?
    • Bandwidth
    • Power
    • Cost
    • Latency
    • Reliability
    • Security
  3. What image dataset is most commonly used in machine learning algorithm development?
    • CIFAR-10
  4. What tools are used to train and deploy a machine learning model on an embedded...
lock icon
The rest of the chapter is locked
You have been reading a chapter from
MicroPython Projects
Published in: Apr 2020Publisher: PacktISBN-13: 9781789958034
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Jacob Beningo

Jacob Beningo is an independent consultant who specializes in microcontroller-based embedded systems. He has advised, coached, and developed systems across multiple industries, including the automotive, defense, industrial, medical, and space sectors. Jacob enjoys working with companies to help them develop and improve their processes and skill sets. He publishes a monthly newsletter, Embedded Bytes, and blogs for publications about embedded system design techniques and challenges. Jacob holds bachelor's degrees in electrical engineering, physics, and mathematics from Central Michigan University and a master's degree in space systems engineering from the University of Michigan.
Read more about Jacob Beningo