Skip to content

Instantly share code, notes, and snippets.

View martinius96's full-sized avatar

Martin Chlebovec martinius96

View GitHub Profile
@martinius96
martinius96 / nodemcu_parser.ino
Created December 22, 2017 02:27
NodeMCU voice control - english language - all languages supported
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
const int led = 16; //pin D0 on NodeMCU board
const char* ssid = "wifiname";
const char* password = "wifipassword"; //wifipass
const char* host = "mywebsite.com"; //without https and www
const int httpsPort = 443;
const char* fingerprint = "13 9f 87 1d b1 85 be e6 bd 73 c1 8d 04 63 58 99 f0 32 43 92"; // SHA1 fingerprint HTTPS of webserver
void setup() {
Serial.begin(115200);
@martinius96
martinius96 / ovladanie-6-rele.ino
Created April 16, 2018 20:38
Ovládanie 6x relé cez mikrokontróler Arduino, ovládanie z webu
#include <SPI.h>
#include <Ethernet.h>
const int svetlo1 = 3;
const int svetlo2 = 5;
const int svetlo3 = 6;
const int zasuvka1 = 7;
const int zasuvka2 = 8;
const int zasuvka3 = 9;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //fyzicka adresa MAC
char serverName[] = "www.arduino.php5.sk"; // webserver
@martinius96
martinius96 / ESP32-Eduroam.ino
Created June 4, 2018 23:35
ESP32 sketch for access Eduroam network under WPA2 Enterprise (802.1x), also usable for another WPA2 Enterprise networks!
//Sketch edited by: Martin Chlebovec
//My website: https://arduino.php5.sk
//Donate me: https://www.paypal.me/Chlebovec
//You can use it for eduroam or for any other RADIUS network
#include "esp_wpa2.h"
#include <WiFi.h>
String line; //variable for response
const char* ssid = "eduroam"; // Eduroam SSID
const char* host = "arduino.php5.sk"; //external server domain
#define EAP_IDENTITY "login@university.com" //identity@youruniversity.domain
@martinius96
martinius96 / Arduino-Ethernet-W5100-parser.ino
Created June 4, 2018 23:39
Parser for Arduino and Ethernet shield W5100 for parse variable from .txt file
//https://arduino.php5.sk
//Autor: Martin Chlebovec (martinius96)
#include <SPI.h>
#include <Ethernet.h>
int led = 6;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //MAC
char serverName[] = "www.arduino.php5.sk"; // webserver
IPAddress ip(192, 168, 2, 40);
EthernetClient client;
String readString;
@martinius96
martinius96 / Arduino-Ethernet-W5500-parser.ino
Created June 4, 2018 23:40
Parser for Arduino and Ethernet module W5500 for parse variable from .txt file
//https://arduino.php5.sk
//Autor: Martin Chlebovec (martinius96)
#include <SPI.h>
#include <Ethernet2.h>
int led = 6;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //MAC
char serverName[] = "www.arduino.php5.sk"; // webserver
IPAddress ip(192, 168, 2, 40);
EthernetClient client;
String readString;
@martinius96
martinius96 / attinyhc05.ino
Created July 4, 2018 00:19
HC-05 + AtTiny85 - test sketch
// Author: martinius96
// Support: https://www.paypal.me/Chlebovec
// Personal web: https://arduino.php5.sk
// Email: martinius96@gmail.com
#define RX 3
#define TX 4
#define pinLED 0
#include <SoftwareSerial.h>
SoftwareSerial bluetooth(TX, RX);
@martinius96
martinius96 / DHT22-BMP280.ino
Created July 14, 2018 00:40
Arduino read datas from dht22 + BMP280
#include "DHT.h"
#define DHTPIN 2 // what digital pin we're connected to
#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321
DHT dht(DHTPIN, DHTTYPE);
#include "Adafruit_BMP280.h" //bmp280 kniznica s upravou na 0x76 adresu
Adafruit_BMP280 bmp; //inicializacia BMP senzora
void setup() {
bmp.begin(); //start snimaca BMP
dht.begin();
Serial.begin(9600); //SPUSTENIE SERIOVEJ LINKY --UART-- NA CITACIU RYCHLOST 9600
@martinius96
martinius96 / connect_eduroam_2018_fix.ino
Created August 14, 2018 21:56
Newest sketch for connecting to WPA/WPA2 Enterprise networks that using PEAP + MsCHAPv2.
//Sketch provided by: T. Vandenryt
#include "esp_wpa2.h"
#include <WiFi.h>
String line; //variable for response
const char* ssid = "eduroam"; // Eduroam SSID
const char* host = "arduino.php5.sk"; //external server domain
#define EAP_IDENTITY "login@university.domain" //identity@youruniversity.domain
#define EAP_PASSWORD "password" //your Eduroam password
void setup() {
byte error = 0;
@martinius96
martinius96 / EnterpriseESP32Eduroam.ino
Created September 13, 2018 14:15
Connection to Eduroam network via ESP32 2018 - new fix with latest Arduino core for ESP32
#include "esp_wpa2.h"
#include <WiFi.h>
String line; //variable for response
const char* ssid = "eduroam"; // Eduroam SSID
const char* host = "arduino.php5.sk"; //external server domain
#define EAP_IDENTITY "login@university.domain" //identity@youruniversity.domain
#define EAP_PASSWORD "password" //your Eduroam password
void setup() {
byte error = 0;
Serial.begin(115200);
@martinius96
martinius96 / ESP32-Eduroam-2018.ino
Created September 29, 2018 19:01
2018 sketch for connecting esp32 to Eduroam network. Worked under PEAP + MsCHAPv2 or EAP-TTLS under WPA/WPA2 Enterprise networks.
#include "esp_wpa2.h"
#include <WiFi.h>
String line; //variable for response
const char* ssid = "eduroam"; // Eduroam SSID
const char* host = "arduino.php5.sk"; //external server domain
#define EAP_IDENTITY "login@university.domain" //identity@youruniversity.domain
#define EAP_PASSWORD "password" //your Eduroam password
void setup() {
byte error = 0;
Serial.begin(115200);