20 UNO Learning Sequence

Learning Sequence

Some of the files referred to in this book can be obtained from a GitHub repository to install, view, and run on your own computer. (Download as a zip and expand at a convenient location on your computer. Avoid using links or aliases in the path to this Resources folder, as both Arduino and Jupyter may have trouble following them.)

Downloading the complete package is particularly useful for Jupyter Notebooks and Arduino sketches that rely on having all the component files in the right folders to avoid errors. Check out the example notebooks under RWS-Notes/Code – Arduino/Learning Sequence for some samples that will be useful in your course work. The videos below are based on using the UNO with this code, but are easily followed on other microcontroller boards. There are updated versions of some of these sketches under RWS-Notes/Code – Arduino/Learning Sequence SAMD that take advantage of the capabilities you get with a more advanced processor like the SAMD M0 on the Adafruit Itsy Bitsy M0 Express.

The videos below will lead you through key examples from RWS-Notes/Code – Arduino/Learning Sequence. The S1.4 Overview video a little further down provides a summary for review.  (video 4:16)

Now we can read in some hardware values to make sense of the real world, write out some results using Serial.print() and blink an LED on and off. (video 8:39)

Defining some macros will help simplify our printing process and save you repetition, where errors often creep in. (video 5:47)

To record and analyze data as a function of time, we need to know what time it is now, and how long it has been since we last checked the data. We can save values from the previous loop() as global variables, or as local static variables. (video 14:18)

The IDE allow us to organize code into separate tabs, which it stores as separate files in the sketch directory. Knowing time and a little history allows us to smooth our data to reduce the effects of noise. Exponential smoothing is low overhead and helps a lot. (video 12:53)

This video pulls together all the changes we made so far and gives you a good review as a starting point for data acquisition in your labs. (video 8:12)

As you go further, keep in mind the details of how you choose your variables and do your calculations in order to get the most accurate results. (video 6:18)

The web is full of resources for learning more about Arduino and electronics. Try the Adafruit Learning pages or http://www.toptechboy.com/arduino-lessons/ if you are looking for more than you find here.

License

Icon for the Creative Commons Attribution-ShareAlike 4.0 International License

Rick's Measurement for Mechatronics Notes Copyright © 2019 by Rick Sellens is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book