What it does
The whole project allows users to play Simon's saying game on the 4x4 grid board and the result will be shown on the webpage. Each user can enter 6 numbers for each round. When playing together, we can make the game more difficult by increasing the distance. The ultrasound sensor can help to figure out the distance
We have never played Simon's saying game and we want to play. Due to the covid, half of the semester is online, so we want to develop a game that can play remotely.
How we built it
Due to transportation problems, we can not use the PCB board we designed The project MCU is a samw25 chip, which can connect to the internet at the same time. The I2C drive connects to the NEOTRELlLIS board, which can turn on the LED pin when the pin is pressed. The MCU will record the order of pins pressed and send it to the web page. The same order of pins will be shown on the webpage, so two users can play at the same time. Besides, the ultrasound sensor can work as a command to figure out the distance.
Challenges we ran into
We spend a few days on the ultrasound sensor. The trigger pin is out and Echo is the pin. After the trigger is set high for a short period of time, the echo pin will produce ultrasound and bounce back. We need to measure the duration of the pulse. But, first of all, the delay_us of the ASF library has a lot of problems, causing the whole program to be stacked. We change into delay_ms, but this decreases the accuracy. At the same time, the serial print statement takes too much time, causing missing proper input. The debug message caused problem and took a few days to fix.
Accomplishments that we're proud of
We succeed in sending the proper signal to the node-red webpage. Each user will press six pins at a time, and after that, the device will send the signal to the web page and reflect the sequence of inputs. The distance sensor can work as a command. The distance sensor can work as a command. We modify the getdistance command and now it can work properly