This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WiFi.h> | |
#include <esp_now.h> | |
bool buttonDown = false; | |
bool ledOn = false; | |
#define STATUS_LED 23 | |
#define STATUS_BUTTON 22 | |
void formatMacAddress(const uint8_t *macAddr, char *buffer, int maxLength) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <esp_now.h> | |
#include <WiFi.h> | |
int int_value; | |
float float_value; | |
bool bool_value = true; | |
//Receiver MAC Address | |
uint8_t broadcastAddress[] = {0x0c, 0xB8, 0x15, 0xCA, 0xE2, 0xD8}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <esp_now.h> | |
#include <WiFi.h> | |
typedef struct struct_message { | |
char a[32]; | |
int b; | |
float c; | |
bool d; | |
} struct_message; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> //servo library | |
Servo servo; | |
int trigPin = 5; | |
int echoPin = 6; | |
int servoPin = 7; | |
int led= 10; | |
long duration, dist, average; | |
long aver[3]; //array for average | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
#include <Servo.h> | |
#define led 13 | |
SoftwareSerial HC12(2,3); | |
Servo motor1,motor2; | |
char recv_ch; | |
int angl1=90,angl2=90; | |
void setup() | |
{ | |
HC12.begin(9600); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
#define led 0 | |
SoftwareSerial HC12(1,2); | |
void blink_led() | |
{ | |
digitalWrite(led,HIGH); | |
delay(250); | |
digitalWrite(led,LOW); | |
} | |
void setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Sketch generated by the Arduino IoT Cloud Thing "Untitled" | |
https://create.arduino.cc/cloud/things/8b59cc8e-df69-4ca9-bb48-0eef1751e497 | |
Arduino IoT Cloud Variables description | |
The following variables are automatically generated and updated when changes are made to the Thing | |
CloudLight lED; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
#define led 0 | |
SoftwareSerial HC12(1,2); | |
void blink_led() | |
{ | |
digitalWrite(led,HIGH); | |
delay(250); | |
digitalWrite(led,LOW); | |
} | |
void setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void sendDFCommand(byte Command, int ParData) { | |
byte commandData[10]; | |
byte q; | |
int checkSum; | |
commandData[0] = 0x7E; //Start of new command | |
commandData[1] = 0xFF; //Version information | |
commandData[2] = 0x06; //Data length (not including parity) or the start and version | |
commandData[3] = Command; //The command that was sent through | |
commandData[4] = 0x01; //1 = feedback | |
commandData[5] = highByte(ParData); //High byte of the data sent over |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "HX711.h" | |
#include <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#include <Pushbutton.h> | |
const int HX711_DOUT = 2; | |
const int HX711_SCK = 3; | |
HX711 scale; |
NewerOlder