Home Creators Posts Import Register Favorites Logout

Content

This post contains additional resources to accompany the "Weight For It!" puzzle described at https://www.patreon.com/posts/17180927

Arduino Code:

https://drive.google.com/open?id=1Bve_xL0A18v_yAOqKT2ssfGz3bKE0P6K

Wiring Diagram:

https://drive.google.com/open?id=1lY_WM0fepxITuWCpRvLn_l73Ab7Foila

Fritzing Project:

https://drive.google.com/open?id=1WkjRYukNKX58ql5hW7UCIX2qZuHrpwgv

Documentation:

https://drive.google.com/open?id=1jPVI4rfeW4OWBxstH-I-OS6p7ua133ue

Comments

Martin Ruiz

Hi Alastair, thank you for everything you've done. It is very interesting and I hope to use it. I Wanted to know in this prop how can I change the lock to normal open? Only HIGH is changed by LOW in arduino program? Thank you very much.

Adrien Miller

Hi i have a problem with the calibration for the weight of the object. For the first time of setup, i had place a known weight on the scale. The data was stored in the EEPROM. When i tried to run it the whole system with an external power supply, it was not working. Do i have to always 'place a known weight on the scale' before the weighting scale to work?

Lena Polin

Hi Alastair ! I am currently learning how to have fun with Arduino and use it to create fun escape game challenge :D I am currently creating my first real one for my big brother for Halloween ! Ans I really hope I can make this one happen !! And most of all, impress him :p

HistoryPod

Hi Alistair. Having become somewhat addicted to Escape Rooms, my kids have been badgering me to create some for them. For the first time since my GCSE DT class (20+ years ago!) I'm therefore back on the breadboard, and this project has inspired me to give it a go. My circuit is up and running, and I'm running your code as written on an Uno. Everything seems to be functioning as expected, except when the calibration takes place it won't wait for a key press before beginning to monitor the scale weight. This means I don't have time to take the calibration weight off, and results in the scale interpreting the weight as zero even though there is a weight on there. Do you have any idea why the Arduino might not be waiting for the key press? I haven't altered your code in any way so am at a bit of a loss since "while (!Serial.available()){ ; }" is in the usual place after the 'press any key' instruction.

Valentin Chalan

Hi Alistair ! Thanks for sharing such a nice puzzle ! Some questions : the calibration seems to be false : when i put my 500g item, i write "500" then "enter" and, as HistoryPod said, the scale factor is set up and the reading starts imediately (doesn't wait for entering the key to continue) and so, when i remove my item, the measure is negative (-500) cause the machine set the calibration weight to 0 (it would be 500). So, if i want my solution weight to be 500, i have to calibrate with my 500g item and then, the real item that will work have to weight 1000g (-500+1000=500). Another problem is the memory : when the puzzle is calibrated, how do you do for the Arduino remembers this weight ? When i shut off the Arduino and turn on again, calibration starts again. It means that i have to calibrate each time ?

Valentin Chalan

With "No line ending" it works correctly ! Thank you Alistair.

Valentin Chalan

One other problem was that when the puzzle is solved, you cannot solve it again without reset or restart Arduino. I fixed it by adding "delay(10000); puzzleState = Running;" after "puzzleState = Solved" in void onSolve.

Valentin Chalan

And to finish, as my Arduino didn't save the Calibration after i turn it off, i proceed in 2 steps : Step 1, i calibrate with the correct item as you show in the video and i note the value of the scaleFactor. Then i enter the correct value in my code and i clear all the calibration code so that at next starts, it will only take the measure and compare it with the solutionWeight. All is OK for me ! Thanks again ! ;-)

oleg ardassov

hello, i have a problem. My weight prop doesn,t work anymore. And i can,t upload it using your code. i get : :\Users\olega\Documents\Arduino\libraries\HX711-master\src/HX711.h:19:7: note: candidate expects 1 argument, 2 provided Multiple libraries were found for "HX711.h" Used: C:\Users\olega\Documents\Arduino\libraries\HX711-master Not used: C:\Users\olega\Desktop\Arduino\libraries\HX711-master exit status 1 no matching function for call to 'HX711::HX711(const uint8_t&, const uint8_t&)'

oleg ardassov

i changed the code from HX711 scale(A0, A1); to const int LOADCELL_DOUT_PIN = 7; const int LOADCELL_SCK_PIN = 8; HX711 scale; and setup : scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN); and when i try calibrating after I put in weight he jumps over the renive weight and press button and start scaling .

oleg ardassov

i can,t understand why it worked before and doesn,t work now. Code is the same, only thing is a reinstalled arduino and download library again.

Wackzitt

Hello. Hoping you will see this message for the old post. Love this puzzle and was trying to replicate it. Everythings seems to work; however, when it is solved I have it pushing to a relay. It does not seem to push to the relay. I have switched the HIGH and LOW around, but have still not had any luck. Any pointers?

Matthew T Harding

Can this be adapted for 4 load cells using the same library?