/ / Arduino para PC Bluetooth Comunicação - c #, android, python, c ++, bluetooth

Arduino para PC Bluetooth Comunicação - c #, android, python, c ++, bluetooth

Eu estou usando o sensor de movimento PIR com Arduino Bluno (com módulo Bluetooth). Eu quero enviar os valores de movimento detectados pelo sensor de arduino para o PC via Bluetooth.

Como posso conseguir isso no meu PC? Pode ser de C ++, C # ou até mesmo Python. Será grato se alguém puder ajudar.

Aqui está o meu código arduino:

int ledPin = 13;                // choose the pin for the LED
int inputPin = 2;               // choose the input pin (for PIR
int pirState = LOW;
char str1;// we start, assuming no motion detected
int val = 0;
volatile int count =0;// variable for reading the pin status

void setup() {

// pinMode(ledPin, OUTPUT);      // declare LED as output
Serial.begin(115200);
pinMode(inputPin, INPUT);     // declare sensor as input

attachInterrupt(digitalPinToInterrupt(2), pin_ISR,FALLING);
}

void pin_ISR() {

count++;

Serial.write(Serial.print(count));
}

Respostas:

0 para resposta № 1

A menos que você queira especificamente que o pc seja diretamentereceber, você poderia usar outro arduino para receber uma impressão para o monitor serial. Você poderia então ter um programa coletar e salvar o que veio no monitor serial. Apenas uma sugestão. Pode ser mais fácil no final. Boa sorte, o que você escolher fazer.