arduino bluetooth  

 

Arduino Bluetooth
5v Vcc
Gnd Gnd
RXD (pin0) TXD
TXD (pin1) RXD

 

arduino code

analog -bluetooth

 

void setup()
{
Serial.begin(9600);
}

void loop()
{
int sensorValue = analogRead(A0);
float voltage = sensorValue * (5.0 / 1023.0);
Serial.println(voltage);
delay (300);
}

創作者介紹
創作者 記錄學習的過往 的頭像
ken

記錄學習的過往

ken 發表在 痞客邦 留言(0) 人氣( 125 )