Skip to content

Instantly share code, notes, and snippets.

View fxprime's full-sized avatar

Modulemore ขายอุปกรณ์ Arduino, เครื่องมือช่าง, raspberry pi, สอน ROS fxprime

View GitHub Profile
#include <Arduino.h>
#include <Wire.h>
/* -------------------------------------------------------------------------- */
/* BME280 Variable */
/* -------------------------------------------------------------------------- */
#include "SparkFunBME280.h"
/*
ESP32 eeprom_extra example with EEPROM library
This simple example demonstrates using other EEPROM library resources
Created for arduino-esp32 on 25 Dec, 2017
by Elochukwu Ifediora (fedy0)
*/
#include "EEPROM.h"
#include <Arduino.h>
const int wait_time = 5000; //เวลารอ 5 วินาที
const int sensor_foot = 8; //ขาสัญญาณเซนเซอร์ PIR ที่เท้า
const int sensor_glass = 9; //ขาสัญญาณเซนเซอร์ PIR ที่กระจกหลัง
const int sensor_steer = 10; //ขาสัญญาณเซนเซอร์ PIR ที่พวงมาลัย
const int buzzer = 13; //ขาสัญญาณขาออกไปยัง Buzzer
unsigned long foot_ts = 0; //ตัวแปรเก็บค่าเวลาเมื่อเซนเซอร์เท้าจับสัญญาณความเคลื่อนไหวได้
unsigned long glass_ts = 0; //ตัวแปรเก็บค่าเวลาเมื่อเซนเซอร์กระจกมองหลังจับสัญญาณความเคลื่อนไหวได้
unsigned long steer_ts = 0; //ตัวแปรเก็บค่าเวลาเมื่อเซนเซอร์พวงมาลัยจับสัญญาณความเคลื่อนไหวได้
#include "Fsm.h"
/*
* FSM Library sample with user and timed
* transitions.
* Uses a button and Arduino builtin led,
* button can be replaced just grounding
* pin.
*/
/**
* www.ModuleMore.com
* ตัวอย่างการใช้งาน Shield LCD พร้อมปุ่มกด
*/
#include <Arduino.h>
/************************************************************************/
#include <Wire.h>
#include <LiquidCrystal.h>
/**
* www.ModuleMore.com
* ตัวอย่างการใช้งาน Shield LCD พร้อมปุ่มกด
*/
#include <Arduino.h>
/**
* www.ModuleMore.com
* ตัวอย่างการใช้งาน Shield LCD พร้อมปุ่มกด
*/
#include <Arduino.h>
#include <Wire.h>
#include <LiquidCrystal.h>
const int LCD_RS = 8;
/***************************************************
This is an example sketch for our optical Fingerprint sensor
Designed specifically to work with the Adafruit BMP085 Breakout
/***************************************************
This is an example sketch for our optical Fingerprint sensor
Designed specifically to work with the Adafruit BMP085 Breakout
/***************************************************
This is an example sketch for our optical Fingerprint sensor
Designed specifically to work with the Adafruit BMP085 Breakout