I need a FAIL SAFE

i yust finished my robot in tank style . And i tested the funktion .

If i drive and hold the joystick in any moving position and LOSE contact by just stoping the app or a fail internet …my robot keeps on driving .

i think this is a major issue . and i need a savety FAIL SAVE . like normaly rc stuff all have a FS.

Stefan

Good idea! What are your plans and/or ideas for accomplishing that?

I think this is trivial. Few lines of code to check every 200ms if you are still connected to the server, if you are not, stop the motors.

@Costas I was going for a “Socratic questioning” method, but dangling a hint of a codeing solution works as well :stuck_out_tongue:

i now very trivial … but im a newbee …and to write my own code isnt blynk style . my idea is to implement in the blynk app .

but if you can write it please . for bolt sides if robot loses contact and if my smartphone losses contact to …

im still to much beginner to do this job …

stefan

here is my plan … i go sleep and will use tomorrow to study it

stefan

I can send you some rubber bumpers for the tank.

1 Like

sorry have already my rubber bumpers :wink:

I can almost see your point… but “blinking an LED” vs “Semi-autonomous failsafe on a self-powered moving object”, is not quite the same… some code will be required, and NO, no one will “write it please” for you without seeing some efforts on your part first.

ideas first and the rest comes second . i go sleep and will use tomorrow to bring my efforts as much i can …

stefan

Sounds good… we will be here to help :slight_smile:

interrupts()

Description

Re-enables interrupts (after they’ve been disabled by noInterrupts()). Interrupts allow certain important tasks to happen in the background and are enabled by default. Some functions will not work while interrupts are disabled, and incoming communication may be ignored. Interrupts can slightly disrupt the timing of code, however, and may be disabled for particularly critical sections of code.

Parameters

None

Returns

None

Example

void setup() {}

void loop()
{
noInterrupts();
// critical, time-sensitive code here
interrupts();
// other code here
}

can this be the right way ?? so now i have to learn c /c++

You don’t need to use interrupts just the libraries Blynk provides. SimpleTimer will do the job, take a look through Blynk for Beginners and help with your project

That was a quick nap :smiley: And to some degree, YES you will need to learn enough to get by… I also have a tank drive robot that I made, and while I did find an app to simply control it with, I still needed to know enough to modify the Arduino sample sketch to match my hardware and accommodate any “extras” that I wanted, (LED control, gear change, and even a “how to not let your robot take off on its own” routine).

I haven’t Blynkified that robot yet, but when I do, I know I will need to understand how Blynk communicates and how to detect disconnects.

Search around this forum for the words connect, disconnect, etc. to see how others have handled the same types of issues.

so im strugeling
just one question .
How can my robot check the connection to my phone . would be the same as in the app
true = phone online max 500 ms
false = offline = pin x shut down

stefan

@stefan8484 take a look at the Connection Management section of the docs at http://docs.blynk.cc/#blynk-firmware-connection-management
Specifcally the Blynk.connected() function.

Have you studied the comprehensive docs in detail?

My board has destroyed because 12v have come to the big metall lanport accidentally. Have a cable not isolated :wink:
now my board is fully opened … if i power 5 v the cables starts to glow …:joy: hahahaha

1 Like

Checking the Blynk link status is not sufficient for a fail-safe as this seems to check the connection between the controller and the Blynk server and not the connection between the Blynk server and the IOS/Android device.

One potential solution that I am using is to have the robot controller (in my case a Rasp Pi) “ping” the IOS/Android device every second when the robot is moving. If the ping “fails” then the movement shuts down.

The only downside is that I have to manually load the IP address of the IOS device each time as I do not use a fixed IP address.

1 Like

@SNorwood are you using the ping with the server connection check or just ping?
Is the ping just on your LAN?