On Github mhellar / ga_physcomp3
Code Here:http://bit.ly/2kUhjBH
The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object like bats do. It offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use package. From 2cm to 400 cm or 1” to 13 feet. It operation is not affected by sunlight or black material like an infrared rangefinders are (although acoustically soft materials like cloth can be difficult to detect). It comes complete with ultrasonic transmitter and receiver module.
Features
Build the following circuit
Upload HC-SR04.ino
Libraries
The Arduino environment can be extended through the use of libraries, just like most programming platforms. Libraries provide extra functionality for use in sketches, e.g. working with hardware or manipulating data. To use a library in a sketch, select it from Sketch > Import Library. A number of libraries come installed with the IDE, but you can also download or create your own.
Let install the NewPing library
Go to 'Sketch'->'Include Library'->'Manage Libraries'
Search for 'New Ping'
Go to 'File'->'Examples'->'NewPing'->'NewPingExample'
Adafruit has branded these Neopixels
You can get them for half the price on Ebay as ws2812's
Import the NeoPixel Library
Import the NeoPixel Library
Let's try some examples and write our own code!
FastLED
Fast LED LibraryAPA102
APA102 aka “Superled”Remote Control
Hook Up the IR reciever
Receive_Custom_neo.ino