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 <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
uint32_t running_time; | |
#define A1 PA2 | |
#define A2 PA3 | |
#define LED_PIN PC13 | |
#define PWM_OUT PA8 | |
#define BT_G PB11 |
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 drive_1(int val){ | |
if(val>0){ | |
digitalWrite(dir1,HIGH); | |
analogWrite(pwm1,val) | |
}else{ | |
digitalWrite(dir1,LOW); | |
analogWrite(pwm1,-val) | |
} |
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 uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */ | |
#define TIME_TO_SLEEP 60 /* Time ESP32 will go to sleep (in seconds) */ | |
#include "pm25senses.h" | |
#include <HPMA115S0.h> | |
const char *ssid = "CMMC_Sinet_2.4G"; | |
const char *passw = "********"; | |
String sendername; |
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 <math.h> | |
#include <Servo.h> | |
int Ch1_in = 2; | |
int Ch2_in = 3; | |
int ChA_out = 9; | |
int ChB_out = 10; | |
unsigned long Chan1_startPulse, Chan2_startPulse, Chan3_startPulse, Chan4_startPulse, Chan5_startPulse; |
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 manual_mode 0 | |
#define auto_mode 1 | |
#include <Servo.h> | |
#include "NazaDecoderLib.h" | |
float radius_of_earth = 6378.137; // km | |
#ifndef ATTITUDE_SENSING_DISABLED |
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 manual_mode 0 | |
#define auto_mode 1 | |
#include <Servo.h> | |
#include "NazaDecoderLib.h" | |
#ifndef ATTITUDE_SENSING_DISABLED | |
uint32_t currTime, attiTime; | |
#endif |
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 <BlynkSimpleSerialBLE.h> | |
#include <SoftwareSerial.h> | |
#include <TinyGPS.h> | |
TinyGPS gps; | |
void GPS_M6(); | |
void Print(); | |
unsigned long age; | |
#ifndef DEGTORAD | |
#define DEGTORAD 0.0174532925199432957f |
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 CMMC_USE_ALIAS | |
//#define bme280 | |
#include <Arduino.h> | |
#include <Wire.h> | |
#include <SPI.h> | |
#ifdef bme280 | |
#include <Adafruit_BME280.h> | |
#endif |
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
const int signal_pin = 3; | |
float SPEED_RPM = 0; | |
void setup() { | |
// initialize digital pin LED_BUILTIN as an output. | |
pinMode(LED_BUILTIN, OUTPUT); | |
pinMode(signal_pin, INPUT_PULLUP); | |
Serial.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
รายการอุปกรณ์ | |
2 ตัว http://www.thaieasyelec.com/products/sensors/ky-033-line-tracking-sensor-detail.html (สำรอง 1 ตัว) | |
2 ตัว http://www.thaieasyelec.com/products/sensors/infrared-sensor-module-detail.html (สำรอง 1 ตัว) | |
1 แผ่น A4 สติกเกอร์สีดำด้าน | |
1 แผ่น A4 สติกเกอร์สีขาวเงา | |
arduino 1 บอร์ด | |
สาย usb สำหรับเสียบบอร์ด arduio ต่อมายังคอมพิวเตอร์ (ความยาวตามต้องการ) | |
เครื่องมือ ปีนยิงกาวยาง สายรัดเคเบิลไทร์ เทปกาวสองหน้า |