-
Notifications
You must be signed in to change notification settings - Fork 1
Main Unit
The main unit is the head of the game and give instructions to the sensors.
You need to use an USBASP for ISP programmer like this one Pins on the programmer need to be:
- MOSI
- 5V
- X (Not in use)
- X (Not in use)
- RESET
- X (Not in use)
- SCK
- X (Not in use)
- MISO
- Ground
Never use external power when the SPI programmer is connected!! The SPI Programmer will give power to the target board it self.
If your goal is to have plenty of targets saved at the same time, you need to redesign pcb to use the ATmega2560 chip. That is the same chip as the Arduino Mega has. We use the same chip as some Arduino Clones have, and Arduino Nano. There is not the same memory to store the code on that chip.
All variables, library’s, the code uses memory space. You can check by just add the code to arduino and select Arduino Nano and do compile if you add more space for targets. If the limit exceed over 100 % then it is to much.
So if you add in the target array 20 targets space then it will use memory.
You need an nextion display to be able to use this. I have used the 7” basic one for this project. Read more here
If you would like to use an rasperry pi with the main unit, use the RX and TX pins that the nextion display use. Well you also need to do your own code on the main unit.
The main unit needs power from usb. Use an powerbank to power the system. It’s also possible to use 12v but i recommend to use USB power.
The led is there to inform when the power is on.
The sd card is used to store settings and other information. We are using JSON to store the data.
The built in clock module is there so we can get time and date on some data.
You control it with a touchscreen (Nextion) and you setup each targets that you going to use in the game. When a game is started, the main unit will randomly pick a target and send out an signal. When a hit signal returns, it will randomly pick another one. Until game is done.
The SD card on the unit is to store settings and other good stuff.