Designed to be low cost, Arduino Pro Mini Very cheap compact postage size Arduino. driving I2C OLED Display
Project showcase by MaxChess
Arduino & Rapberry Pi based chess computer that uses Stockfish ,recognises piece positions using reed switches and signals its move
Hi, great project. I have most of the hardware in place and use a python script to trigger a single relay on an Arduino, but your Ascom based approach is much better.
I am trying to understand your sketch to adapt to my arduino with a single relay attached directly to a pin.
So first what pin is the relay attached to by the Relay hat?
In the wiring diagram you appear to connect just one relay, however the sketch looks like it is addressing 4 relays:
#define stop 4
#define sensor 5
#define close 6
#define open 7
I am a bit out of practise on Arduino code, so might be reading this wrong, or maybe only one relay is used in your hardware setup.
Also on your wiring diagram between PHO, the scope and the Arduino, what is this?
Anyway any clarification is helpful. Great project
Sorry for the delay. On Point 1. you know when a piece is lifted, so you record that, then you use "anti-bouncing" techniques to wait for the final position. for example if you delay half a second before recording the final position, then most drags get ignored.
Point 2. Similar technique to the above. You wait for all sensible moves to be completed before deciding what you have got. If moves are always a lift (reed closes) or a place (reed opens).
Then Lift - Place is a completed move to an empty square.
On Whites move: Lift (white) - lift (Black) and Lift (Black), Lift (White) must both be white taking black, which should be confirmed by Place(white) from the Lift(Black) square
Or connect with your social account:
New here? Create an account