Week 9
Assignment - Input Devices
-
Group assignment:
- Probe an input device(s)'s analog levels and digital signals (As a minimum, you should demonstrate the use of a multimeter and an oscilloscope.)
- Document your work on the group work page and reflect on your individual page what you learned
-
Individual assignment:
- Measure something: add a sensor to a microcontroller board that you have designed and read it.
From Assignment Details.
Group Assignment
Move to group page:
First, I wrote an I2C scanner example sketch (by Adafruit Industries, 2023 by Carter Nelson): writeup. The following is from the Serial Monitor:
Message (Enter to send message to 'XIAO_ESP32C3' on '/dev/cu.usbmodem145401')
New Line
115200 baud
15:54:09.755 -> Scanning...
15:54:09.755 -> I2C device found at address 0x3C !
15:54:09.786 -> I2C device found at address 0x77 !
15:54:09.786 -> done
Knowing the I2C addresses(0x77 was the BME280, and 0x3C is the SSD1306 oled), I could upload a demo sketch to the board I made in week 8.
I used ChatGPT to try to make the demo code (log linked in the Files section).
I designed the boards in week 8 to make it easy to connect i2c devices. Unfortunately, the order of the pins didn't match either. For speed, I solved this with the cable. In future I would prefer to redesign the board.
What to measure...
The BME280 is an environmental sensor (humidity, pressure, and temperature). The SEN0236 is an implementation of it by DFRobot with a I2C connector and pins for an SPI connection.

Because the component is surface mounted, it is kinda hard to probe, but based on the schematic of the SEN0236, the SCL and SDA connections are available at the "P1" connector.

Connected:

- temp image
- green is
SDA, and blue isSCL

Files
Reflection
XXX
Measure Something
The hardware is as above.
I have an instance of Mosquitto and Home Assistant in my lab, which I am using to log, and display charts.
XXX