Navigation Menu

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 / Simple BT HC06 Test
Created March 26, 2023 11:08
Test of HC 06 Bluetooth moudule. Echo server.
/** modified by SteFam www.fambach.net GPLII*/
#include <SoftwareSerial.h>
SoftwareSerial bt(10, 11); // RX | TX
void setup()
{
Serial.begin(9600);
bt.begin(9600); //Default Baud rate
/** idf example
*
* Simple hello world example with single output on the console
*
* Some parts are copied from the official idf examples found on
* https://docs.espressif.com/projects/esp-idf/en/latest/esp32/
*
* Modified by SteFam @ http://www.fambach.net
*
* GPLv3
#include <WiFi.h>
#include <ESPmDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
const char* ssid = "NODES";
const char* password = "HappyNodes1234";
const uint8_t ANALOG_PORTS[]= {2,4,35,34,36,39};
/***************************************************
Adapted example For TTGO TS V1.2
I made a view changes
set to 1.4"
adapted the mediabuttons - the button now fit to the 1.4" screen
See more on http://www.fambach.net
This is a library for the Adafruit 1.8" SPI display.
// *************************************************
// SR04 Ultrasonic Distance Sensor
// time to distance conversion is
// divide by 2 (both ways to the obstical and back)
// divide by sonic constant 29.1
#define TRIGGER_PIN 3
#define ECHO_PIN 2
#define SC_MM 5.82
#define SC_CM 58.2
/**
* Example from the library.
* I changed the two hardware serials to one software serial
* More details under http://www.fambach.net/FTMini-Laser/
*
* The original lib to be no longer existing in Git, install it via Arduino Gui (keyword = tfmini, Author= hideakitai)
*
*/
#include "TFmini.h"
/**
* SMS Test with TinyGSM Lib
*
* Tested on TTGO T-Call 1.3
*
* Lib: https://github.com/Xinyuan-LilyGO/TTGO-T-Call
*
* For further information see also
* www.fambach.net
*
/**
* 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/
*
/**
* 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
/** HC SR501 Test
* www.fambach.net
* GPL V2
*/
#define SR501PIN A0
void setup() {
Serial.begin(115200);