Skip to content

Instantly share code, notes, and snippets.

@zackhaikal
zackhaikal / gist:596e5305b2c51a160449eb972bbe38a2
Created December 1, 2016 01:32 — forked from freespace/gist:2585921
Backup of some arduino code to handle OV7670
#define SIO_C 2
#define SIO_D 4
#define SIO_CLOCK_DELAY 100
void setup()
{
pinMode(8,OUTPUT);
// while(1)
// {
@zackhaikal
zackhaikal / hc-sr04.ino
Created October 5, 2016 08:30 — forked from flakas/hc-sr04.ino
Modified Arduino Ping))) example to work with 4-Pin HC-SR04 Ultrasonic Sensor Distance Measuring Module
/* HC-SR04 Sensor
https://www.dealextreme.com/p/hc-sr04-ultrasonic-sensor-distance-measuring-module-133696
This sketch reads a HC-SR04 ultrasonic rangefinder and returns the
distance to the closest object in range. To do this, it sends a pulse
to the sensor to initiate a reading, then listens for a pulse
to return. The length of the returning pulse is proportional to
the distance of the object from the sensor.
The circuit: