This file contains hidden or 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
// Example testing sketch for various DHT humidity/temperature sensors | |
// Written by ladyada, public domain | |
#include "DHT.h" | |
#define DHTPIN 2 // what pin we're connected to | |
// Uncomment whatever type you're using! | |
#define DHTTYPE DHT11 // DHT 11 | |
//#define DHTTYPE DHT22 // DHT 22 (AM2302) |
This file contains hidden or 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
// ทดสอบการอ่านค่า จาก Moisture Sensor ผ่าน Analog Port A0 | |
// โดย Arduitronics | |
// www.arduitronics.com หรือ www.facebook.com/arduitronics | |
int sensorPin = A0; // select the input pin for the potentiometer | |
int ledPin = 13; // select the pin for the LED | |
int sensorValue = 0; // variable to store the value coming from the sensor |
This file contains hidden or 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
/* | |
* TimeRTC.pde | |
* Example code illustrating Time library with Real Time Clock. | |
* This example is identical to the example provided with the Time Library, | |
* only the #include statement has been changed to include the DS3232RTC library. | |
*/ | |
#include <DS3232RTC.h> //http://github.com/JChristensen/DS3232RTC | |
#include <Time.h> //http://playground.arduino.cc/Code/Time | |
#include <Wire.h> //http://arduino.cc/en/Reference/Wire |
This file contains hidden or 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
/*----------------------------------------------------------------------* | |
* Display the date and time from a DS3231 or DS3232 RTC every second. * | |
* Display the temperature once per minute. (The DS3231 does a * | |
* temperature conversion once every 64 seconds. This is also the * | |
* default for the DS3232.) * | |
* * | |
* Set the date and time by entering the following on the Arduino * | |
* serial monitor: * | |
* year,month,day,hour,minute,second, * | |
* * |
This file contains hidden or 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
//We always have to include the library | |
#include "LedControlMS.h" | |
/* | |
Now we need a LedControl to work with. | |
***** These pin numbers will probably not work with your hardware ***** | |
pin 12 is connected to the DataIn | |
pin 11 is connected to the CLK | |
pin 10 is connected to LOAD | |
We have only a single MAX72XX. | |
*/ |
This file contains hidden or 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
//We always have to include the library | |
#include "LedControlMS.h" | |
/* | |
Now we need a LedControl to work with. | |
***** These pin numbers will probably not work with your hardware ***** | |
pin 12 is connected to the DataIn | |
pin 11 is connected to the CLK | |
pin 10 is connected to LOAD | |
We have only a single MAX72XX. | |
*/ |
This file contains hidden or 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
// I2C Scanner | |
// Written by Nick Gammon | |
// Date: 20th April 2011 | |
#include <Wire.h> | |
void setup() { | |
Serial.begin (115200); | |
// Leonardo: wait for serial port to connect |
This file contains hidden or 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> // Library for I2C communication | |
#include <LiquidCrystal_I2C.h> // Library for LCD | |
// Set the LCD address to 0x27 for a 16 chars and 2 line display | |
LiquidCrystal_I2C lcd(0x3F, 16, 2); | |
// อย่างลืมเปลี่ยนตรงนี้ครับ | |
void setup() | |
{ | |
// initialize the LCD | |
lcd.begin(); | |
// Turn on the blacklight and print a message. |
This file contains hidden or 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
// LCD5110_Bitmap -- Nine in heart | |
// Copyright (C)2016 Arduitronics.com All right reserved | |
// Library by | |
// web: http://www.RinkyDinkElectronics.com/ | |
// | |
// This program is a demo of how to use bitmaps. | |
// You can also see how to use invert(). | |
// | |
// It is assumed that the LCD module is connected to | |
// the following pins using a level shifter to get the |
This file contains hidden or 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
//Sample using LiquidCrystal library | |
#include <LiquidCrystal.h> | |
/******************************************************* | |
This program will test the LCD panel and the buttons | |
Mark Bramwell, July 2010 | |
********************************************************/ | |
// select the pins used on the LCD panel | |
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); | |
// define some values used by the panel and buttons | |
int lcd_key = 0; |