Skip to content

Instantly share code, notes, and snippets.

View sfambach's full-sized avatar
🏠
Working from home

Stefan Fambach sfambach

🏠
Working from home
View GitHub Profile
@sfambach
sfambach / dht11.ino
Last active June 22, 2019 08:24
DHT11 Test
// www.fambach.net
// GPLv2
// ------------------
#include "DHT.h" //DHT Bibliothek laden
#define DHTPIN GPIO5 // Pin auf dem Arduino
#define DHTTYPE DHT11 // Typ des Sensors
DHT dht(DHTPIN, DHTTYPE); // Eine Instanz des Sensors erstellen
@sfambach
sfambach / LinearerServoTest.ino
Created June 23, 2019 17:29
Test of a linear servo, connecto to serial monitor and press enter (send empty string) to activate.
// Linearare Servo Test
// www.famnbach.net
// GPLv2
// -----------------------
#include <Servo.h>
#define SERVO_PIN 10
Servo myservo;
@sfambach
sfambach / OpenSmartWirelessJoystickRemoteReceiver.ino
Created June 30, 2019 09:56
Open Smart Wireless Joystick Remote Receiver Testprogramm
/** Test the Open-Smart Wireless Joystick
* Receiver program
* http://www.fambach.net
* GPL v2
*/
#include <String.h>
#include "VirtualWire.h"
int RF_RX_PIN = A3;
@sfambach
sfambach / PanTiltTest.ino
Created June 30, 2019 14:36
Check a Pan Tilt, drive in all directions and back again.
/***********************************************
* Check pan/tilt with two servos
* www.fambach.net
* GPL v2
*/
#include<Servo.h>
Servo servox;
Servo servoy;
@sfambach
sfambach / PanTiltAndJoy.ino
Created June 30, 2019 22:13
Controlling a Pan Tilt with help of a Joystick
/***********************************************
* Control pan/tilt with joystick
* www.fambach.net
* GPL v2
*
* you can influence the drive of the servos by adjusting the min and max values.
*/
#include<Servo.h>
@sfambach
sfambach / potiServo.ino
Created July 19, 2019 12:36
Petentiometer controles Servo (Simple mapping example)
/** Servo test with potentiometer
* http://wwww.fambach.net
* GPLv2
*/
#include <Servo.h>
#define SERVO A3
#define POTI A0
Servo s1;
@sfambach
sfambach / Receiver.ino
Created August 7, 2019 14:02
Arduino Nano Clone with nRF24 on board
// Nano Remote Receiver
// This programm receives a char array with maximum size 20
// www.fambach.net
//
// Libs:
// https://github.com/tmrh20/RF24/
//
// GPL2
/***********************************************************/
// radio
/** HC SR501 Test
* www.fambach.net
* GPL V2
*/
#define SR501PIN A0
void setup() {
Serial.begin(115200);
/**
* Code snippet to read data from KY-037 / KY-038 sound sensor board
* define ports for digital and analog input
* Fambach.net
*/
// please adapt to your wiring
#define MIC_SIGNAL_PIN A1
#define MIC_THRESHOLD_PIN 2
/**
* Blink Test with Fouxmo Lib, controlling esp built in led with Alexa
*
* For ESP8266/ESP32 Tested with WEMOS D1 Mini (ON/OFF are reversed)
*
* Basis is the example form fauxmo https://bitbucket.org/xoseperez/fauxmoesp
* Additional Requirements:
*
* fouxmoESP https://bitbucket.org/xoseperez/fauxmoesp/src/master/
*