There is an interpretation of the phrase "prospering light, " meaning light and success. I interpreted it as something more complicated, bringing light to those who are deprived of their voice when the spotlight moves away from them.
There were always two things that would come up in my mind whenever I thought about this project idea. One is the book "Animal Farm" by George Orwell, and the second is the ancient Egyptian scales of Ma'at. While the pigs take control in the book through a sudden revolution that ends with everyone forgetting the old order, the scales of Ma'at are an embodiment of its complete opposite. An ancient Egyptian method for keeping the ruling class accountable, with a public weighing of a person's heart versus a feather as the measure of their morality.
A Particle Photon 2 connects to two APIs every ten minutes. One is the Press Freedom API, which records attacks on journalists. The other is the GDELT project, which monitors global protests. The output data of these systems controls the tilt of a homemade Egyptian scale via a 28BYJ-48 stepper motor installed at its fulcrum point. If more instances of journalist violence take place, the “pig” side tips down. More protestations cause the other side to react. It never balances out completely, though.
The Webhook ProblemThis is where I lost the most time. The webhook system on Particle didn’t provide me with a nice and neat response; it returned data in chunks, which I discovered through trial and error. I created an object that collected the chunked responses and then waited for a certain amount of time to pass to make sure the entire response was gathered before processing anything. The complicated part here was making sure that this process did not stop the second webhook from being executed independently of the first one. Both processes had to be executed at the right time and in the correct order without interfering with each other, and this required much more iteration than I thought.
Following the MotorUnlike the 28BYJ-48, the motor itself does not have any notion of its current position. It simply steps according to commands and assumes that the user knows what position it’s at. Thus, I had to be responsible for the tracking — an ever-updating counter that incremented and decremented with each step taken by the motor, allowing it to return to its neutral position after each oscillation. This might seem straightforward, but if the counter were ever to go awry, the entire concept of the piece would become meaningless.
Now that the code was really working, it came time to transfer everything from the breadboard to a perfboard. This is when the construction itself rebelled against me. It didn’t matter what I did; the scale arm just wouldn’t fit correctly into the motor housing. Super glue did it for me in under thirty seconds after I’d spent at least an hour trying. Some things just can’t be argued with.
LEDsI had 137 WS2812B LEDs powered by a single 5V 2A power supply, along with the microcontroller. The initial plan was to change colors depending on which side of the scale was heavier. Pig’s side would show red and some other color would be displayed when the humans were on the heavy side. I made my calculations and understood that too much dynamic current from all these LEDs, along with powering the microcontroller, would simply fry the whole system. Thus, I decided to run them in constant white mode. To my surprise, this ended up being an excellent decision since the LEDs did not show favoritism at all.













_3u05Tpwasz.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)
Comments