LOGIN
Steven Reubenstone
Mechanical Engineer & Collaborizm Mentor. Join our iOT Hackathon! (Project Leader)
 · New YorkU.S.
Edit
Delete
Share
Report
QUESTION
  ·  Mark as Answered

Some Code I Need Help With

…I am currently wiring up my bluetooth module to my Arduino, which is connected to an H-Bridge. I diagrammed everything, uploaded the code, and ran it…but nothing is happening.

SoftwareSerial Genotronex(10, 11); // RX, TX
int ledpin=13; // led on D13 will show blink on / off
int BluetoothData; // the data given from Computer

void setup() {
  // put your setup code here, to run once:
  Genotronex.begin(9600);
  Genotronex.println("Bluetooth On please press 1 or 0 blink LED ..");
  pinMode(ledpin,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
   if (Genotronex.available()){
BluetoothData=Genotronex.read();
   if(BluetoothData=='1'){   // if number 1 pressed ....
   digitalWrite(7,HIGH);
   Genotronex.println("LED  On D13 ON ! ");
   }
  if (BluetoothData=='0'){// if number 0 pressed ....
  digitalWrite(7,LOW);
   Genotronex.println("LED  On D13 Off ! ");
  }
}
delay(100);// prepare for next data ...
} 

I am struggling a bit with this. Does anyone have familiarity with TESTING this code? I can not tell if its a CODE issue or HARDWARE issue. Your help is greatly appreciated!!

3 likes 
Like
Share
Load 8 previous comments
Lawal Bayode
ahmad
 · Nigeria
Edit
Delete
Share
Report

the blue tooth data definition was the problem.

0 like 
Jaydeep
Edit
Delete
Share
Report

can you provide info of pin at arduino uno r3 , which is connected to H bridge pin no : 1(EN) , 2 (1.A) and 7 (2A).

0 like 
Jaydeep
Edit
Delete
Share
Report

can you also provide block diagram of current setup?

0 like 
Bi Sh
Design Invention Research
 · KathmanduNepal
Edit
Delete
Share
Report

…i think in this situation where the h-bridge output is not as expected… its better to just excite the input of h-bridge n check the output… may be its faulty?
Steven Reubenstone

0 like 
Steven Reubenstone
Mechanical Engineer & Collaborizm Mentor. Join our iOT Hackathon! (Project Leader)
 · New YorkU.S.
Edit
Delete
Share
Report

hey team…I will have an update for you today or tomorrow, sorry for the delay.

0 like 
Lawal Bayode
ahmad
 · Nigeria
Edit
Delete
Share
Report

the diagram looks pretty okay. let me know if the problem continues might have to re-create it here for u

0 like 
Leave a reply...
DISCOVER
CHAT
ALERTS
-2
DISCUSSIONS
-1
FEED