Home Creators Posts Import Register Favorites Logout

Content

Hi!

You can find the files to accompany the "Pirate Ship's Wheel" puzzle at the following Google Drive link:

https://drive.google.com/drive/folders/1Uoh1SCiHa_RB55cajzQHZL-Jcs3d8leq?usp=share_link

There's the Arduino code in a subfolder, Fritzing project and diagram of the wiring, and the STL and OpenSCAD files of the mounts I created for the magnet and the AS5600 sensor.

Rather than downloading the files one at a time, I recommend clicking to download the entire directory of files as a ZIP file, and then unarchiving them to the appropriate place on your computer.

Please do ask if any questions! (And, if you don't get a response, please do continue to nag me - I'm really bad at noticing/replying to communications - don't think I'm ignoring you, I'm just disorganised :) )

Comments

Jay Loftis

I would like to do something similar but with three different wheels. Wheel 1 turn left X times. Wheel 2 turn right Y times etc. Adafruit sells a multiplexer for I2c Do you think that could work?

Jay Loftis

I am having an issue trying to modify this code. I wanted it to work with full turns of the wheel. I have tried modifying both of these constants but it does not seem to work. Any suggestions?

Jay Loftis

const int solution[] = {-6, -6, 6, 1, -1, 1, -1, 1, -1, 1, -1, 1}; // Define properties of rotary input const int numSegments = 6; /

Jay Loftis

I have set the numSegments to 3 and 1. Alternately, I have set the solutions to 3 and 6. In either case I do not see the result I am looking for. As shown I get the wrong turn prompt when I have turned the wheel only a small amount. Any suggestions? Am I looking in the wrong spot? Thanks

Jim Brainard

I couldnt get a 5v relay to work with an esp32, I guess esp32s are only 3.3v? I ordered a 3v relay to see if it works

Jim Brainard

I couldnt get it to work : (

Jim Brainard

I know that the puzzle was working because I added a serial.print function to indicate that the puzzle was solved but the digitalwrite to the pin wouldnt trigger the relay, I even tried other pins

Alastair Aitchison

So if you're triggering the relay using a digitalWrite(HIGH), you need the jumper between the middle pin and the H pin.

Jim Brainard

even if I set the relay pin LOW in the code in the setup, the relay still comes on like it has a high signal

Jim Brainard

the problem was the expansion board...... i had a screw behind it, just have been shorting something out

Jim Brainard

I must be breaking the boards somehow... now the new one isnt working

Jim Brainard

int relayPin = 5; void setup() { // put your setup code here, to run once: pinMode(relayPin, OUTPUT); pinMode(relayPin, HIGH); } void loop() { // put your main code here, to run repeatedly: digitalWrite(relayPin, HIGH); delay(2000); digitalWrite(relayPin, LOW); delay(2000); }

Jim Brainard

I used this to test the board and relay, new board worked, now its not