LOGIN
Steven Reubenstone
39
Community Expert
Mechanical Engineer & Tinkerer of Things. (Project Leader)
 · New YorkU.S.
Share
Report
Get Link
QUESTION
Open

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
Award Contribution
Load 8 previous comments
ahmad
 · Nigeria
Share
Report
Get Link

the blue tooth data definition was the problem.

Like
0 like 
Award Contribution
Jaydeep
0
Noob
Share
Report
Get Link

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).

Like
0 like 
Award Contribution
Jaydeep
0
Noob
Share
Report
Get Link

can you also provide block diagram of current setup?

Like
0 like 
Award Contribution
Bi Sh
1
Apprentice
Design Invention Research
 · KathmanduNepal
Share
Report
Get Link

…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

Like
0 like 
Award Contribution
Steven Reubenstone
39
Community Expert
Mechanical Engineer & Tinkerer of Things. (Project Leader)
 · New YorkU.S.
Share
Report
Get Link

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

Like
0 like 
Award Contribution
ahmad
 · Nigeria
Share
Report
Get Link

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

Like
0 like 
Award Contribution
Leave a reply...
DISCOVER
CHAT
HIRE
ACTIVITY
FEED
New Post
Help
Start Project
Online Users
Share Link