Skip to content

Instantly share code, notes, and snippets.

Avatar

Kit hkstemclub

View GitHub Profile
View ds3231.ino
Skip to content
Search or jump to…
Pull requests
Issues
Marketplace
Explore
@hkstemclub
Learn Git and GitHub without any code!
View MQ_Sensor_SerialMonitor.ino
/* Testing MQ GAS sensor with serial monitor
Suitable for detecting of LPG, i-butane, propane, methane ,alcohol, Hydrogen or smoke
More info: http://www.ardumotive.com/how-to-use-mq2-gas-sensor-en.html
Dev: Michalis Vasilakis // Date: 11/6/2015 // www.ardumotive.com */
const int gasPin = A0; //GAS sensor output pin to Arduino analog A0 pin
void setup()
{
View MQ_Sensor_LCD1602.ino
/* Testing MQ GAS sensor with serial monitor
Suitable for detecting of LPG, i-butane, propane, methane ,alcohol, Hydrogen or smoke
More info: http://www.ardumotive.com/how-to-use-mq2-gas-sensor-en.html
Dev: Michalis Vasilakis // Date: 11/6/2015 // www.ardumotive.com */
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // 設定 LCD I2C 位址
const int gasPin = A0; //GAS sensor output pin to Arduino analog A0 pin
View ArduinoLCD.ino
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // 設定 LCD I2C 位址
const int analogPin = A0; //sensor output pin to Arduino analog A0 pin
const bool digitalPin = 1; //sensor output pin to Arduino analog D0 pin
float maxValue = 100.0; // To display percentage maxValue = 100, use other value such as 5.0 to represent 5V
void setup()
View lcd1602.ino
/*
程序在開始時對液晶模塊功能進行了初始化設置,約定了顯示格式。注意顯示字符時光標是自動右移的,無需人工干預,每次輸入指令都先調用判斷液晶模塊是否忙的子程序DELAY,然後輸入顯示位置的地址0C0H,最後輸入要顯示的字符A的代碼41H 。
SMC1602A(16*2)模擬口線接線方式
連接線圖:
————————————————– –
|LCM—–51 | LCM—–51 | LCM——51 |
————————————————|
|DB0—–P1.0 | DB4—–P1.4 | RW——-P2.0 |
|DB1—–P1.1 | DB5—–P1.5 | RS——-P2.1 |
|DB2—–P1.2 | DB6—–P1.6 | E——–P2.2 |
View temperture_to92_with_oled.ino
/*
Modify version of https://www.youtube.com/watch?v=7ph5ov56cfg
Code will be used to display a bar graph from measured input voltage from pin A0.
The purpose of this program is to test and demonstrate the display performance of the 128 x 64 display
The display is a Balance world Inc 0.96" Inch Yellow and Blue I2c IIC Serial 128x64 Oled LCD Oled LED Module for
Arduino Display 51 Msp420 Stim32 SCR
This could tested with a Mega but should work with an UNO
Kit hkstem.club
View voltage_bargraph.ino
/*
Modify version of https://www.youtube.com/watch?v=7ph5ov56cfg
Code will be used to display a bar graph from measured input voltage from pin A0.
The purpose of this program is to test and demonstrate the display performance of the 128 x 64 display
The display is a Balance world Inc 0.96" Inch Yellow and Blue I2c IIC Serial 128x64 Oled LCD Oled LED Module for
Arduino Display 51 Msp420 Stim32 SCR