Skip to content

Instantly share code, notes, and snippets.

View IOT-123's full-sized avatar

IOT123 IOT-123

View GitHub Profile
// ESP8266-12E ArduCAM Mini Camera Server
//
// This program demonstrates using an ArduCAM Mini 2MP camera with an ESP8266-12E module.
// An OV2640 2MP ArduCAM Mini was used with this program.
//
// The program has a web interface that will allow:
// - storing and viewing of captured jpg files
// - viewing live streamed video
// - changing the resolution
//
@IOT-123
IOT-123 / poc_lowpower_i2c_slave_ardpromini.ino
Created January 12, 2018 00:00
POC for I2C communication with slave in sleep mode
#include <LowPower.h>
//FOR DEV PURPOSES!!
unsigned int _awakewSecs = 20;
unsigned int _sleepMinutes = 2;
unsigned int _awakeCounter;
#define I2C_ADDRESS 10
@IOT-123
IOT-123 / tilt_pan_tracker_0.3.ino
Created January 18, 2018 10:44
Tilt pan solar tracker with I2C/EEPROM configuration and sleep cycle between movements. Sleep cycle duration precision decreases as duration increases, but sufficient for this purpose.
/*
* modified from code
* by Mathias Leroy
*
* V0.2 MODIFICATIONS
** I2C SET GET
** EEPROM SET GET
** REMOVE SERIAL OUTPUT - AFFECTED I2C
** ENABLE/DISABLE TRACKING
** MOVE SERVOS TO LIMITS VIA I2C
@IOT-123
IOT-123 / d1m_rftxrx_send_demo.ino
Created January 20, 2018 09:19
One of https://github.com/sui77/rc-switch/ demos with pins included for D1M RFTXRX BLOCK.
/*
Example for different sending methods
https://github.com/sui77/rc-switch/
modified fo D1M RFTXRX BLOCK pins
*/
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
@IOT-123
IOT-123 / d1m_rftxrx_receive_demo.ino
Created January 20, 2018 09:21
One of https://github.com/sui77/rc-switch/ demos with pins included for D1M RFTXRX BLOCK.
/*
Example for receiving
https://github.com/sui77/rc-switch/
If you want to visualize a telegram copy the raw data and
paste it into http://test.sui.li/oszi/
modified fo D1M RFTXRX BLOCK pins
*/
#include <RCSwitch.h>
@IOT-123
IOT-123 / d1m_MPU6050_pitch_roll_yaw.ini
Created January 23, 2018 09:28
A test sketch that logs basic PITCH/ROLL/YAW angle for the KY-521 module.
#include "I2Cdev.h"
#include "MPU6050_6Axis_MotionApps20.h"
#include "Wire.h"
MPU6050 mpu;
uint8_t mpuIntStatus;
uint16_t packetSize;
uint16_t fifoCount;
uint8_t fifoBuffer[64];
Quaternion q;
@IOT-123
IOT-123 / tilt_pan_tracker_0.4.ino
Created March 3, 2018 03:10
Tilt pan solar tracker with I2C/EEPROM configuration and sleep cycle between movements. Sleep cycle duration precision decreases as duration increases, but sufficient for this purpose.
/*
* modified from code
* by Mathias Leroy
*
* V0.2 MODIFICATIONS
** I2C SET GET
** EEPROM SET GET
** REMOVE SERIAL OUTPUT - AFFECTED I2C
** ENABLE/DISABLE TRACKING
** MOVE SERVOS TO LIMITS VIA I2C
@IOT-123
IOT-123 / Ultrasonic_Ranging_ATtiny85.ino
Created April 2, 2018 06:07 — forked from imjacobclark/Ultrasonic_Ranging_ATtiny85.ino
For use with an ATtiny85, Ultrasonic Ranging Module HC-SR04 and 3 LEDs.
/*
For use with a 4 Pin Ultrasonic Ranging Sensor, see: http://www.micropik.com/PDF/HCSR04.pdf
& an ATtiny85 Microprocessor
Power can be supplied to the ATtiny85 via the Arduino
VCC // 5v (+)
GND // GND (-)
TRIG // Analog Input 3 (Pin 3)
ECHO // Analog Input 2 (Pin 4)
@IOT-123
IOT-123 / sr04_attiny_trigger_brick.ino
Last active April 9, 2018 10:23
ATTINY85 checks the current distance of objects to a SR04 Ultrasonic range finder against a user configurable value. If closer, a pin is set HIGH to wake a HOST MCU, then sleeps for 1 second. If not closer, just sleeps for a second. Repeat.
// ATTINY85 / 1MHz
#include <EEPROM.h>
#include <avr/sleep.h>
#include <avr/wdt.h>
#define USE_SOFTWARE_SERIAL 1
#if (USE_SOFTWARE_SERIAL)
#include <SoftwareSerial.h>
#include "Arduino.h"
// AVR High-voltage Serial Programmer
// Originally created by Paul Willoughby 03/20/2010
// www.rickety.us slash 2010/03/arduino-avr-high-voltage-serial-programmer/
// Inspired by Jeff Keyzer mightyohm.com
// Serial Programming routines from ATtiny25/45/85 datasheet
// Desired fuse configuration
#define HFUSE 0xDF // Defaults for ATtiny25/45/85
#define LFUSE 0x62