This repository contains the code for the Embedded Systems course at UEF
- Arduino Nano Every full pinout
- Follow the PWM DC Motor Guide, but use a lower resistance resistor for the fan (or it won't spin).
Setup Arduino IDE for Nano Sense Every
- Install the Arduino IDE:
- Plug the board into your computer with the provided USB Micro B cable
- Configure the IDE for Nano Every
- ”avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description"
- Arduino Debugging Basics
Configure the accelerometer & OLED Screen
- Install
Adafruit SSD1306 by Adafruitin the Arduino IDE and optionallyU8g2 by oliverfor a second OLED driver library option (it handles fonts better). Also install theSTM32duino LIS2DW12 by SRAlibrary for the accelerometer. - Wire the OLED and accelerometer to the SCL and SDA ports of the board. DO NOT use external pullup resistors with the OLED display. It won't work. Wire the 3.3V power output to the VCC line. DO NOT wire 5V to the accelerometer or it will kill the sensor.
- Installing libraries in Arduino
- DFRobot Monochrome OLED Display
- DFRobot LIS2DW12 Triple Axis Accelerometer
- DIY Simple Three-axis Accelerometer Data Logger
- I2C Protocol
Add the gyroscope sensor
- Install
Adafruit MPU6050 by AdafruitandMPU6050 by Electronic Catsin the Arduino IDE. - Wire the OLED, accelerometer, and gyroscope to the SCL and SDA ports of the board. Follow the same precautions as before and ensure you use 3.3V power.
See the oscilloscope_tutorial folder for code samples to run.
The tutorial is adapted from Six Oscilloscope Measurements with Arduino
and more detailed information can be found there.
To complete the challenge follow these steps:
- Check Auto-RESET on Arduino Nano Every. Locate the correct resistor via the datasheet and PCB diagram and probe it.
- Check the TX/RX decode behavior. Run both the
2_uart_...scripts. What is the difference between them? - Measured the 3.3V DC Voltage rail. Also measure the 5V voltage rail
- See probe loading in action. Test a ceramic capacitor on the board and notice a difference!
- PWM Duty Cycle testing with sound!
- digitalWrite and port manipulation
- Tone generation with register programming
This tutorial also uses concepts from the following: