Stap 4: De Software van de zender:
Yazılım Geliştirme door Robimek-2015
Yazılım Lisans door Robimek
www.robimek.com
#include < SoftwareSerial.h >
#define BT_SERIAL_TX 4
#define BT_SERIAL_RX 3
SoftwareSerial BluetoothSerial(BT_SERIAL_TX, BT_SERIAL_RX);
Int potpin = A0;
int val;
VOID Setup
{
Serial.begin(9600);
BluetoothSerial.begin(9600);
}
void loop
{
Val = analogRead(potpin);
Val = kaart (val, 0, 1023, 0, 179);
BluetoothSerial.print(val);
delay(100);
}