Implementing examples from the Arduino Uno Starter Kit in Go, or rather TinyGo. Not including schematics since they're all available in the kit and/or online.
On MacoOS:
brew tap tinygo-org/tools
brew install tinygo
Arduino Uno is AVR based (Harvard architecture) microcontroller, so we need to install AVRDUDE. It's an AVR Downloader/Uploader.
brew tap osx-cross/avr
brew install avr-gcc
brew install avrdude
Turns the on-board LED on for one second, then off for one second, repeatedly.
Blinks red LEDs alternatively when button is pressed. Otherwise, green LED is on.
Uses analog temperature sensor to measure temperature of your finger. LEDs stay off if your temperature is below 20C. One red LED lights up if your temperature is higher than 20C but less than 23C. All 3 LEDs light up if your temperature is higher than 23C.
Uses 3 photoresistors assigned to Red, Blue and Green colors, and one RGB led. It captures the amount of light incident to the sensors and transforms it to an analogical signal. Then, this signal is sent to the RGB led through digital outputs. RGB led transforms this signal into a colored light.
Uses a servo motor to make a mechanical gauge. Servo motor included in the kit is used to make an arm that moves in reaction to potentiometer. When the knob of the potentiometer is turned, the ratio of voltage is changed and that is then fed to the servo to move the arm. Two capacitors are used to smooth out voltage changes that occur when we turn the potentiometer.
Uses a Photoresistor and a Pieze element to make a light-based Theremin. Theremin is an instrument that makes sounds based on the movements of a musician’s hands around the instrument. In this case, we're going to be making movements above the photoresistor. Reading from that sensor will then be used to calculate the pitch and send it to the piezo.
Demo video uploaded to YouTube (sound on!):
A four-key musical keyboard using button sensors and a piezo speaker.
Demo video uploaded to YouTube (sound on!):
Uses tilt sensor and 6 leds to create a clock that turns a led on every ten minutes. Reset the clock the same way you would reset an hourglass: by tilting it back and forth!
(Demo has the interval set to 1 second instead of 10 minutes)
Uses transistor and higher voltage to spin a pinwheel. When you press the button, the pinwheel spins. 9-volt battery required.