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; |
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 <Keypad.h> | |
#include <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#define SCREEN_WIDTH 128 // OLED display width, in pixels | |
#define SCREEN_HEIGHT 64 // OLED display height, in pixels | |
#define OLED_MOSI 9 | |
#define OLED_CLK 10 |
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
#define ir_sensor_1 14 | |
#define ir_sensor_2 15 | |
#define ir_sensor_3 16 | |
#define ir_sensor_4 17 | |
#define ir_sensor_5 18 | |
#define ir_sensor_6 19 | |
#define led1 2 | |
#define led2 3 | |
#define led3 4 | |
#define led4 5 |
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 <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#include <WiFi.h> | |
#include <time.h> | |
#define SCREEN_WIDTH 128 | |
#define SCREEN_HEIGHT 64 |
NewerOlder