News:

The Latest electronic and computer Tips that work!

Main Menu

Control with Bluetooth

Started by branx86, October 05, 2015, 10:45:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

branx86

http://duino4projects.com/cheap-2-way-bluetooth-connection-between-arduino-and-pc/

YouTube Video - 

//////////////////////////////////////////////////////////////////////////////////
// REMIXED BY: TECHBITAR (HAZIM BITAR)
// LICENSE: PUBLIC DOMAIN
// DATE: MAY 2, 2012
// CONTACT: techbitar at gmail dot com

int counter =0;

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

void loop() {
counter++;
Serial.print("Arduino counter: ");
Serial.println(counter);
delay(500); // wait half a sec
}

//////////////////////////////////////////////////////////////////////////////////

// REMIXED BY: TECHBITAR (HAZIM BITAR)
// LICENSE: PUBLIC DOMAIN
// DATE: MAY 2, 2012
// CONTACT: techbitar at gmail dot com

char INBYTE;
int  LED = 13; // LED on pin 13

void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);
}

void loop() {
Serial.println("Press 1 to turn Arduino pin 13 LED ON or 0 to turn it OFF:");
while (!Serial.available());   // stay here so long as COM port is empty
INBYTE = Serial.read();        // read next available byte
if( INBYTE == '0' ) digitalWrite(LED, LOW);  // if it's a 0 (zero) tun LED off
if( INBYTE == '1' ) digitalWrite(LED, HIGH); // if it's a 1 (one) turn LED on
delay(50);
}



Using FlashMagic video -