Line follower & ultrasonic sensor & bluetooth

Hi all!

My problem would be:
I have a tracking robot program that monitors the obstacles that appear before the line track with an ultrasonic sensor. If you detect obstacles, you can then go to the shortest route to find the line and continue the line tracking. The program I wrote, any similarity with other programs is just a coincidence! :slight_smile:

Thinking over, I'd have to do a bluetooth connection from my smartphone to navigate the robot to the line. this is needed because if the robot is packed (50-100kg), do not push it by hand. Then after the robot reaches the line, you can start line tracking with a button and all the other things I've described above. Yesterday I wrote a bluetooth control. Which letter to react to the motors. But anyway, trying to "combine" the two programs, it fails.

I've been thinking about it for 2 months. I did not want to ask for help because I just wanted to solve the way the line was followed.
Because I'm Hungarian, the programs are bilingual. It may not be easy to understand.

I'm in the two programs.

Can you help me with it?

If anyone can help and go to Hungary, I'll call you for a beer ... or two! ;):wink:

Thank you very much for everyone!

Blutusz_betus_vezerlo_by_laci_Bluetooth_based_control_attempt.ino (1.69 KB)

vonalkoveto_ultrasonic_all_Line_follower_ultrasonic_all.ino (4.59 KB)

Do the two individual programs both work correctly?

Where is the combined program and what does "it failed" mean? If it failed to compile show the errors. If it did something not what you want then say what exactly it did do and what you want it to do that's different.

"It failed" is not exactly helpful as a problem description.

Steve

The two programs work separately. For me, the combined program should be. Do one of the two programs to do 1. I also tried what is in the void loop () section of the line program, so I did another void, namely void all (). I moved the bluetooth control to the void loop (). To keep track of serial transmission. I'm making a mistake when it comes to tracking volnu, so I can find out the robot through bluetooth. But I would have to solve the void all () part of the jump to the beginning if it came to an end. It's like another loop. After the void all () part program, I wrote a {goto (all);} command. From now on he could not translate it. It may be because the program needs a loop in the end, since I was back before reaching the loop, the compiler made a mistake. Referring to void all () being invoked.

The controller is really just a sketch. To understand bluetooth in this way. I was wondering if I would send a letter through a serial connection, how can I interpret it with arduino. Opening the app is a special theme.

Do not get me wrong, in this area I really do not have much experience. I've never been involved in wireline data transmission. Even so, I did not even make 1 out of 2 programs, especially for me not so complicated level.