Skip to content

Main Unit

Andreas Olsson edited this page Aug 7, 2023 · 5 revisions

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:

  1. MOSI
  2. 5V
  3. X (Not in use)
  4. X (Not in use)
  5. RESET
  6. X (Not in use)
  7. SCK
  8. X (Not in use)
  9. MISO
  10. Ground

Never use external power when the SPI programmer is connected!! The SPI Programmer will give power to the target board it self.

Memory limit

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.

Nextion Display

You need an nextion display to be able to use this. I have used the 7” basic one for this project. Read more here

Use a raspberry pi with main unit

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.

How it’s designed

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

The led is there to inform when the power is on.

SD Card

The sd card is used to store settings and other information. We are using JSON to store the data.

RTC

The built in clock module is there so we can get time and date on some data.

How it works

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.

Clone this wiki locally