small arduino programs
These are small Arduino projects to introduce me to basic electrical concepts.
Simon Says
Features
- “touch sensors” with piezo transducers
- LCD
Development Notes
- Circuit diagram (excluding LCD)
- Used
LiquidCrystalIO
library by Adafruit#include <LiquidCrystalIO.h> #include <IoAbstractionWire.h> #include <Wire.h>
Resources/Tutorials Used
Automatic Dog Feeder
Prototype 1
Clockwise: 1) Funnel design for box, 2) Pockets for trapped kibble leading to jam when closing, 3) Internal circutry and wiring
Github
Features
- 3 triggers: Bluetooth, physical button, scheduled (in code)
Development Notes
- Arduino board: Nano 33 IOT
- Since I used a board with the header pins setup for breadboard use, using the pinout diagram was helpful to see where I needed to put the connections
- Code for the Bluetooth feature sampled from the offical Arduino tutorial
- Service is the Arduino with the servo activation boolean (
0
for closed, anything else for open) as the characteristic
- Service is the Arduino with the servo activation boolean (
- Code for automatic time activation feature sampled from offical Arduino tutorial about the internal RTC of the board
- Thread that led me to the idea of using RTC
- To keep the RTC in sync with real-world time, the code connected via WiFi to an NTP server and updates the RTC - idea taken from this thread, library with examples, tutorial article for Nano 33 IOT
- It uses the
RTCZero
library’sset*
methods
- It uses the
- Connecting servo motors
- Orange signal pin must wired to a PWM pin
- Used the
Sweep
example withfor
loops for the open/close motion
Links to Useful Tutorials/Documentation for Arduino-specific projects
- String addition - Arduino does not use standard string concatentation
- Hooking up a button
- Can get rid of the pull-up (1->0) or pull-down(0->1) resistor with
INPUT_PULLUP
andINPUT_PULLDOWN
- Can get rid of the pull-up (1->0) or pull-down(0->1) resistor with
- Powering up an Arduino board
- Operating voltage vs input voltage