/*
hc05slave.ino
Use this for the controller
Add potentiometers for joystick paddles
Written by Michael Wright
Robotics for Kid Geniuses
https://www.y2kLeader.com
HC-05   Arduino    
EN      pin 4 (only used in programming mode)
VCC     pin 5
GND     GND
TXD     pin 2
RXD->Voltage Divider--> pin3
*/
#include <SoftwareSerial.h>
int rx=2;
int tx=3;
int power=5;
int data_from_master=0;
String datamode="numbers";
SoftwareSerial Bluetooth(rx,tx);
void setup() {
  Serial.begin(38400);
  Bluetooth.begin(38400);
  pinMode(power,OUTPUT);
  digitalWrite(power,HIGH);
  Serial.println("Slave Ready");
  Serial.println("When the Master is started or reset you");
  Serial.println("  should see the numbers 72 69 76 76 79");
  Serial.println("  that translates to      H  E  L  L  O");
  Serial.println("_______________________________________");
}
void loop() {
  if (Bluetooth.available()){
     data_from_master=Bluetooth.read();
     Serial.println(data_from_master);
  }
}
