Skip to content

Instantly share code, notes, and snippets.

#include <SoftwareSerial.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
#include <Wire.h>
#define SOFT_FAST
#define MAG_ADDRESS 0x30
float magX, magY, magZ;
void setup() {
Wire.begin();
Serial.begin(9600);
#include "ESP8266WiFi.h"
#include <SPI.h>
#include <SD.h>
#include <Wire.h>
#include "RTClib.h"
#include <SocketIOClient.h>
#include <ESP8266HTTPClient.h>
#include <ArduinoJson.h>
<SoftwareSerial.h>
SoftwareSerial rs485(2, 3);
#define RS485_TX 2
#define RS485_RX 3
#define RS485_EN 6
#define VOLTAGE_READ A5
#define LED_RS485 A3
#define LED_DIPSWITCH A2
#define LED_MOSFET A1
#!/usr/bin/env python
import cv2
import imutils
from imutils.video.pivideostream import PiVideoStream
import numpy as np
import json
import time
import datetime
import os
#include <TimerOne.h>
// Motor 1
int delayDown = 6500;
int delayUp = 10000;
int dir1PinB = 6;
int dir2PinB = 5;
/*********************************************************************
This is a library for our Monochrome OLEDs based on SSD1306 drivers
Pick one up today in the adafruit shop!
------> http://www.adafruit.com/category/63_98
These displays use SPI to communicate, 4 or 5 pins are required to
interface
Adafruit invests time and resources providing this open source code,
/****************************************************************************************************
* rfiduino.h - RFIDuino Library Header File
* RFID transfer code modified from RFIDuino Library by TrossenRobotics / RobotGeek
*
****************************************************************************************************/
#include "Arduino.h"
#include "naturewatch_RFID.h"
int led1 = 10;
int led2 = 9;
int cap1_threshold = 2;
int cap2_threshold = 2;
void setup() {
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
Serial.begin(115200);
int tiltX = 9;
int tiltZ = 12;
int tiltY = 6;
void setup() {
// put your setup code here, to run once:
pinMode(13, OUTPUT);
digitalWrite(13, 0);
pinMode(tiltZ, INPUT_PULLUP);
pinMode(10, OUTPUT);