Commit 5a2bb631 authored by attssystem's avatar attssystem
Browse files

Updated README

parent 9a5420af
......@@ -165,7 +165,7 @@ bool c2 = false;
bool c3 = false;
int ID;
int addR = ID - 1;
int channel;
int channel = 1;
int addT;
byte weaponNb;
byte gameTime;
......@@ -198,6 +198,11 @@ byte dataBytes[5] = {0xA1, 0xF1, ID, 0xAA, 0xAA};
void setup() {
// IR Rx-Tx configuration
Serial.begin(9600);
EEPROM.get(4, ID);
// Screen configuration
......@@ -210,12 +215,13 @@ void setup() {
display.clearDisplay();
display.drawBitmap(0, 0, logo, 128, 32, WHITE);
display.display();
delay(3000);
delay(1500);
display.setTextSize(2);
display.setCursor(0, 0);
c3 = askUI("Modifier", "ID ou Freq?", 2500, c3);
if (c3 == true) {
//c3 = askUI("Modifier", "ID ou Freq?", 2500, c3);
Serial.println(c3);
/*if (c3 == true) {
// ID configuration
......@@ -226,7 +232,7 @@ void setup() {
channel = confUI(1, ID, "Freq arme", "", false, channel);
}
}*/
// nRF24 configuration
......@@ -236,10 +242,6 @@ void setup() {
radio.setPALevel(RF24_PA_MIN);
radio.startListening();
// IR Rx-Tx configuration
Serial.begin(9600);
// Generic configuration (Inputs-Outputs)
pinMode(trigger, INPUT_PULLUP );
......@@ -249,7 +251,7 @@ void setup() {
// Loop code
void loop() {
configuration();
//configuration();
play();
returnStart();
ending();
......@@ -316,7 +318,8 @@ bool askUI (char char1[], char char2[], int wait, int configurable) {
display.display();
timeStart = millis();
timeVal = 0;
while (timeVal < wait && c == false) {
while (timeVal < wait && configurable == false) {
Serial.println(digitalRead(trigger));
timeVal = millis() - timeStart;
if (digitalRead(trigger) == LOW) {
configurable = true;
......
# laser_game
\ No newline at end of file
# Laser InfraRed Game (aka LIR Game)
##Based on these technologies :
*Core
*Arduino Nano
*Communications
*nRF24l01+ (2,4GHz)
*YIRTM IR Transmitter
*Interface
*SD1306 128x64
*Piezo Buzzer
*Laser (+220Ohm Resistor)
*Button (using internal pullup)
*Power
*StepUp 3.3v to 5v
*3000mAh 3.7v Battery
*Key power switch
##Wiring
TX 31 | | VIN
RX 30 | | GND --- GND IR & nRF24 & Screen
RST 29 | | RST 29
GND | | 5V --- VCC IR + Laser (220 Ohm)
Rx IR --- D2 32 | | A7 22
Tx IR --- D3 1 | | A6 19
CE nRF24 --- D4 2 | Arduino | SCL 28 --- SCL Screen
CSN nRF24 --- D5 9 | Nano | SDA 27 --- SDA Screen
Piezo --- D6 10 | V3 | A3 26
D7 11 | | A2 25
D8 12 | Old | A1 24
Trigger button --- D9 13 | Bootloader | A0 23
D10 14 | | AREF 21
MOSI nRF24 --- D11 15 | | 3V3 --- VCC nRF24 & Screen
MISO nRF24 --- D12 16 | | SCK 17 -- SCK nRF24
##PCB Schematics
Gerber files available in PCB folder
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment