Session 4 – Arduino and interfacing with sensors and computers

This session covers the following subjects

  • Arduino syntax overview
  • Arduino examples
  • Reading digital inputs
  • Writing digital outputs (e.g. for controlling a MOSFET/relay)
  • Sensor theory and how to read them
  • Reading analog sensors and potentiometers
  • I2C, UART, or 1W communication
  • Reading onboard sensors
  • Logging data to Thingspeak
  • Displaying info using RGB LED

Example programming challenges

  • Read a button and turn on an LED when pressed or print some text to the serial port
  • Read a potentiometer, write its values to the serial port and use it to turn on or of an LED or change its color.
  • Read the temperature and change color between blue and red on an LED according to the temperature.

Links

ESP8266 wittyboard reseller & getting started
https://www.faranux.com/product/witty-cloud-board/

Arduino
https://www.arduino.cc/

Controlling an RGB LED using PWM
https://howtomechatronics.com/tutorials/arduino/how-to-use-a-rgb-led-with-arduino/