So basically in this project, I have a solenoid arm locking in a piece. It then holds the piece in place till the 3 sensors detect the 3 needed magnets, then releasing the piece and starting the cycle over again.
The issue I’m having is that the Arduino in the code isn’t receiving the 5v signal being sent to some of the digital inputs, I’ve verified it’s receiving it via multimeter so I’m guessing the issue is somewhere in the code
IT_WORKS_maybe.ino (2.58 KB)
so I'm guessing the issue is somewhere in the code
Well I am guessing your problem is in the hardware. What are these sensors and how are they wired up. Please supply a schematic.
Attached is the basic schematic, the only difference is that it doesn’t include any of the relays I have, they’re 24v sensors and figured the Uno board wouldn’t like that
OK, first things first.
You need to go and read the forum instructions so that you can go back and modify your original post (not re-post it) - using the "More -> Modify" option below the right hand corner of your post - to mark up your code as such using the "</>" icon in the posting window. Just highlight each section of code (or output if you need to post that) from the IDE and click the icon.
In fact, the IDE itself has a "copy for forum" link to put these markings on a highlighted block for you so you then just paste it here in a posting window. But even before doing that, don't forget to use the "Auto-Format" (Ctrl-T) option first to make it easy to read. If you do not post it as "code" it can easily be quite garbled and is always more difficult to read due to the font.
It is inappropriate to attach it as a ".ino" file unless it is clearly too long to include in the post proper. People can usually see the mistakes directly and do not want to have to actually load it in their own IDE. And even that would also assume they are using a PC and have the IDE running on that PC.
Also tidy up your blank space. Do use blank lines, but only single blanks between complete functional blocks.
Here is your graphic: