Étape 4: Émetteur Software :
Yazılım Geliştirme de Robimek-2015
Yazılım Lisans par 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 = carte (val, 0, 1023, 0, 179) ;
BluetoothSerial.print(val) ;
Delay(100) ;
}