Skip to content

Latest commit

 

History

History
90 lines (57 loc) · 3.5 KB

README.md

File metadata and controls

90 lines (57 loc) · 3.5 KB

arduino-fun

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.

Setup

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

Examples

Blinky

Turns the on-board LED on for one second, then off for one second, repeatedly.

Spaceship Interface

Blinks red LEDs alternatively when button is pressed. Otherwise, green LED is on.

IMG_5368

Love-o-meter

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.

IMG_5382

Color mixing lamp

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.

RGB led

Mood Cue

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.

IMG_5407

Light Theremin

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!):

Light Theremin

Keyboard Instrument

A four-key musical keyboard using button sensors and a piezo speaker.

Demo video uploaded to YouTube (sound on!):

Keyboard Instrument

Digital Hourglass

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)

IMG_5507

Motorized Pinwheel

Uses transistor and higher voltage to spin a pinwheel. When you press the button, the pinwheel spins. 9-volt battery required.

IMG_5517