Skip to content

Instantly share code, notes, and snippets.

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

Nicolae Gherasim mindeon

🏠
Working from home
View GitHub Profile
@mindeon
mindeon / epsicom-ap.h
Created October 7, 2022 08:28
epsicom plc pins assignment
// by nicu gherasim
#include <Arduino.h>
#include "RTClib.h"
// board related pins
const int ledPin = LED_BUILTIN; // the number of the LED pin
// relays output
const int REL_1 = 16;
const int REL_2 = 17;
@mindeon
mindeon / eeprom-string.cpp
Last active September 21, 2023 14:32
arduino eeprom read/write string
#include <EEPROM.h>
void writeString(int address, String data)
{
int stringSize = data.length();
for(int i=0;i<_size;i++)
{
EEPROM.write(address+i, data[i]);
}
EEPROM.write(address + stringSize,'\0'); //Add termination null character
@mindeon
mindeon / cjmcu-8128-all.ino
Created March 22, 2019 21:25
CJMCU-8128 CCS811 + HDC1080 + BMP280 (banggood.com) code example
//CJMCU-8128 CCS811 + HDC1080 + BMP280 (banggood.com)
#include <SparkFunCCS811.h> //Click here to get the library: http://librarymanager/All#SparkFun_CCS811
#include <SparkFunBME280.h> //Click here to get the library: http://librarymanager/All#SparkFun_BME280
#include <ClosedCube_HDC1080.h> //Click here to get the library: http://librarymanager/All#ClosedCube_HDC1080
//#define CCS811_ADDR 0x5B //Default I2C Address
#define CCS811_ADDR 0x5A //Alternate I2C Address
CCS811 myCCS811(CCS811_ADDR);