Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@F1973 exactly, but you’re literally not getting ANY help because it’s an edge case in the community.
-
@F1973 yeah! Also, we have so much code on the Arduino and it says “instabilities may occur”, so that also confused me many times, thinking that was the issue
-
@F1973 alright, so we have an Arduino Mega which is the master computer, and we have an Arduino Uno which is the slave (RACIST OMFG /s). The master communicates with the slave through I2C, the slave reads the bytes sent, parses them and just puts them on a SPI-controlled screen in the respective place. When you want to change to memory-fed values, you press a button and then it needs to write MEM at the bottom of the screen.
-
@F1973 oh, I already solved it lol.
So what happened is that I have a function that works as a hardware interrupt (slave-side) when the slave receives or being requested data, and I have a main loop that the slave runs on, separate from the interrupt. I wanted to check if that button is being pressed outside the interrupt, but it completely shat itself every damn time because most of the code and the code that runs most frequently is the interrupt, and interrupts come before normal code! They INTERRUPT normal activity. So I tried to put the check in the interrupt, and voila! Works. -
@F1973 oh, I’m building a digitally controlled and monitored analog equalizer for studios with my dad lol
Related Rants
-
cdrice105"You gave us bad code! We ran it and now production is DOWN! Join this bridgeline now and help us fix this!" ...
-
MoboTheHobo36My Friend: Dude our Linux Server is not working anymore! Me: What? What did you do? My friend: Nothing I swe...
-
tommy15Right now someone at Google is coding something useless for us to laugh at on April Fools.
Regarding my last rant: I AM FUCKING DUMB!
When I receive data from the master Arduino, a hardware interrupt runs and oversteps my main loop stuff!
Lesson? NEVER WRITE HARDWARE LATCHES ON THE MAIN LOOP WITH A HARDWARE INTERRUPT WHICH IS MOST OF YOUR FUCKING CODE!!
rant
i am stupid
i spent a day debugging this
fml
absolutely kill me