Skip to content

Instantly share code, notes, and snippets.

View xxlukas42's full-sized avatar

xxlukas42

View GitHub Profile
@xxlukas42
xxlukas42 / blue_led_matrix.ino
Created May 15, 2019 18:42
Blue LED matrix display 8x16 for your Arduino
/**
* \par Copyright (C), 2012-2016, MakeBlock
* @file Me_LEDMatrixTest.ino
* @author MakeBlock (modified by Petr Lukas)
* @version V1.0.0
* @date 2019/05/12
* @brief Description: this file is sample code for Me LED Matrix device.
*
* Function List:
* clearScreen() Remove content of display
@xxlukas42
xxlukas42 / esp32_internal_hall.ino
Last active April 21, 2024 04:16
Arduino source code for ESP32 internal temperature sensor and hall sensor
void setup() {
Serial.begin(115200);
}
void loop() {
int measurement = 0;
measurement = hallRead();
@xxlukas42
xxlukas42 / philips_hue_ir.ino
Created April 14, 2019 09:28
ESP32 and ESP8266 communication with Philips Hue bridge
/*************************************************************
Hue @ D1 mini Pro (ESP8266)
Basic demo of switch based on IR sensor to demonstrate
communication between ESP and Hue gateway
Version: 1.00
by Petr Lukas
Functionality:
Identify IR signal and switch light on and off using IR remote control.
*************************************************************/
#include <Adafruit_NeoPixel.h>
#define PIN 38
#define NUMPIXELS 1
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(115200);
pixels.begin();
@xxlukas42
xxlukas42 / lolin_d32_pro.ino
Last active March 3, 2023 22:47
Basic demo for Wemos Lolin D32 PRO (ESP32) with build-in SD card reader, TFT display shield and SHT30 sensor
/*************************************************************
Wemos Lolin D32 PRO (ESP32)
Basic demo
by Petr Lukas
*************************************************************/
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <WEMOS_SHT3X.h> // SHT30 library
#include <SPI.h>
#include <SD.h> // SD card library
@xxlukas42
xxlukas42 / eink_demo.ino
Created March 31, 2019 20:47
MH-ET LIVE 1.54-inches E-Paper demo
#include <GxEPD.h>
#include <GxGDEP015OC1/GxGDEP015OC1.cpp>
#include <Fonts/OpenSansBold12pt7b.h>
#include <Fonts/OpenSansBold14pt7b.h>
#include <Fonts/OpenSansBold30pt7b.h>
#include <GxIO/GxIO_SPI/GxIO_SPI.cpp>
#include <GxIO/GxIO.cpp>
#include GxEPD_BitmapExamples
@xxlukas42
xxlukas42 / eepromr_test.ino
Created May 6, 2019 21:02
ESP8266 and ESP32 flash memory
#include <EEPROM_Rotate.h>
EEPROM_Rotate EEPROMr;
#define DATA_OFFSET 10
void setup() {
Serial.begin(115200);
delay(2000);
EEPROMr.size(4);
EEPROMr.begin(4096);
@xxlukas42
xxlukas42 / lora_demo.ino
Created June 12, 2019 19:58
Test script based on LMIC example tested with BSFrance Lora32u4 II v1.2, don't forget to change EUIs
/*******************************************************************************
* Copyright (c) 2015 Thomas Telkamp and Matthijs Kooijman
*
* Permission is hereby granted, free of charge, to anyone
* obtaining a copy of this document and accompanying files,
* to do whatever they want with them without any restriction,
* including, but not limited to, copying, modification and redistribution.
* NO WARRANTY OF ANY KIND IS PROVIDED.
*
* This example sends a valid LoRaWAN packet with payload "Hello,
@xxlukas42
xxlukas42 / weather_station.ino
Created March 8, 2019 19:24
Simple sensorless weather station (OpenWeatherMap API)
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#include <TM1637Display.h>
#define CLK 32
#define DIO 33
const uint8_t CELSIUS[] = {SEG_A | SEG_D | SEG_E | SEG_F};
const uint8_t MINUS[] = {SEG_G};
@xxlukas42
xxlukas42 / wemos_bme280.ino
Created April 3, 2017 19:45
Wemos D1 mini Pro and Bosch BME280
#include <BME280_MOD-1022.h>
#include <Wire.h>
// Wifi and ThingSpeak settings
#include <ESP8266WiFi.h>
const char* ssid = "Your SSID";
const char* password = "Your password";
const char* server = "api.thingspeak.com";