Cannot get StamPLC to run main.py
-
Hello,
I am trying to program an extremely simple PLC setup that reacts to two prox sensors and toggles relay one based on rising and falling actions.
I have the logic laid out perfectly, and have even tried several different ways to achieve the same thing.
However, when I upload to StamPLC, the program works until device reboot, then it will not work at all until I reupload the program.
Any ideas? I've been stuck for days trying to get the thing to work, and I need to wrap up this project for work
-
@tiditidi
You gotta push the download button to permanetly flash the code to the device:
-

Run - doesn't flash your code to device memory - also uses wifi settings made in M5burner
Download - flashes your code so it is in device after reboot - if you need wifi then such blocks must be in the code too as device will not be visible for uiflow2 after reboot without wifi blocks -
Thank you for responding.
Even when I use the download button, it doesn't make a difference. The code will only run until reboot.
I can only get it to work once. I added a couple of images to the screen so that I can move them around in between attempts, and the images display properly. They even move when I move them and reload, indicating the program is in fact being downloaded. However, no matter how I upload to device, only works until reboot.
I should also add that it seems like the relay isn't being initialized. When the program works, the relay clicks when the program starts, and the serial monitor shows the relay open and close commands as they happen. Then on reboot, the relay never clicks, and I see nothing in serial monitor indicating anything is happening at all. But the images are showing in the proper places.