Skip to content

Instantly share code, notes, and snippets.

Avatar

Max maxpromer

View GitHub Profile
View XY-MD02_Uno_R3.ino
/* Dev by IOXhop.com */
#include <SoftwareSerial.h>
SoftwareSerial mySerial(9, 8); // RX, TX
float temp = 0, humi = 0;
void readXY_MD02() {
uint8_t buff[] = {
0x01, // Devices Address
View Relay4CH_Modbus_Test_Uno_R3.ino
#include <SoftwareSerial.h>
SoftwareSerial mySerial(9, 8); // RX, TX
void setup() {
Serial.begin(9600);
mySerial.begin(9600);
mySerial.setTimeout(100);
}
View MSM261S4030H0_ESP32.ino
/* Dev by IOXhop.com */
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <driver/i2s.h>
const char *ssid = "";
const char *password = "";
View Relay4CH_Modbus_Test_2.ino
/* Dev by IOXhop.com */
#define DE_RE_PIN 4
#define MODE_SEND HIGH
#define MODE_RECV LOW
void setup() {
pinMode(DE_RE_PIN, OUTPUT);
digitalWrite(DE_RE_PIN, MODE_RECV);
@maxpromer
maxpromer / DDM18SR_ESP32_Read.ino
Last active Jan 18, 2021
DDM18SR ดิจิทัลวัตต์มิเตอร์ วัดพลังงานไฟฟ้า 1 เฟส MODBUS / RS485 https://www.ioxhop.com/p/1138
View DDM18SR_ESP32_Read.ino
/* Dev by IOXhop.com */
#define DE_RE_PIN 4
#define MODE_SEND HIGH
#define MODE_RECV LOW
void setup() {
pinMode(DE_RE_PIN, OUTPUT);
digitalWrite(DE_RE_PIN, MODE_RECV);
View XY-MD02_Read.ino
/* Dev by IOXhop.com */
#define DE_RE_PIN 4
#define MODE_SEND HIGH
#define MODE_RECV LOW
float temp = 0, humi = 0;
void readXY_MD02() {
uint8_t buff[] = {
View DotMatrix2ShowDirection.ino
#include <IOXhop_DotMatrix.h>
#define MAX_DEVICES 2 // number of MAX7219 module
#define DIN_PIN 23 // DIN pin
#define CLK_PIN 18 // CLK pin
#define CS_PIN 5 // CS pin
IOXhop_DotMatrix dot(MAX_DEVICES, CS_PIN, DIN_PIN, CLK_PIN);
@maxpromer
maxpromer / FullDemo.ino
Created Dec 13, 2020
IOXhop_DotMatrix demo code
View FullDemo.ino
#include <IOXhop_DotMatrix.h>
#define MAX_DEVICES 8 // จำนวนโมดูล Dot Matrix (จำนวนไอซี MAX7219)
#define DIN_PIN 23 // กำหนดขา DIN
#define CLK_PIN 18 // กำหนดขา CLK
#define CS_PIN 5 // กำหนดขา CS
IOXhop_DotMatrix dot(MAX_DEVICES, CS_PIN, DIN_PIN, CLK_PIN);
View BMP280_Test.ino
#include <Wire.h>
#include <Adafruit_BMP280.h>
Adafruit_BMP280 bmp; // I2C
void setup() {
Serial.begin(115200);
Serial.println(F("BMP280 test"));
if (!bmp.begin(0x76)) {
View MPU9250_Test.ino
#include "MPU9250.h"
MPU9250 mpu;
void setup() {
Serial.begin(115200);
Wire.begin();
delay(2000);