Go Down

Topic: From one day to the next, Arduino doesn't work properly  (Read 597 times) previous topic - next topic


Hi ! (English is not my mother tong, so I'm already sorry)

Short version:

I use an Arduino Mega, with Pyfirmata.

Yesterday I use this function :

Code: [Select]
def moteur_capteur(moteur, capteur):

    while True:
        if capteur.read() == False:

So I turn ON the motor, and when the sensor is touch (False), the motor stop.

Yesterday, it worked perfectly, and today … well not any more.

And I totally don't get why !

Thanks for your help.

Edit : I put on the top of the file : #usr/bin/python and it worked only once …


If the code was not changed since it last worked, that suggests it probably isn't a coding issue (though there could totally be some pyfirmata-related complexity I haven't accounted for, as I don't use that), have you doublechecked the hardware connections? Particularly if it's on breadboard, breadboard is highly subject to loose wires.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy


This looks like you have a floating input in your circuit. Please post your circuit for more specific help.


Hey !

Sorry, for the delay ^^

The "solution": I just create an other file, a copy ^^

And if the problem occur, I switch with this file …

I totally don't get it but well … it works ^^

Thanks folks !


I totally don't get it but well … it works ^^
Sorry no it dosn't. You are fooling yourself. It is much more reliable reading chicken entrails.

Go Up