2017-04-15 (Sa) Pi0 Laser Tag PiTagErrUs

Yesterday, another revision to the firmware was predicted. Today, it was revised. Version 0.0.7 has been updated at the link below. This version allows the computer to reset the internal timer. The purpose of an internal timer, which can be synchronized, was to reduce cheating. In some games, it would be possible to take a “learning” remote and program it with the tagger’s code. Then, an unscrupulous player could repeatedly transmit the code for his or her tagger even if the tagger was disabled. It would also allow fully-automatic operation. If players are expecting a time-stamped signal those copied signals would be ignored.

If the taggers were all connected to a wireless network, Wifi for example, it would be possible to ignore copied signal but network traffic would increase. This functionality provides a level of security in the game, although it is far from foolproof. Programmers who do not wish to take advantage of this functionality in their games can easily ignore the feature.

Tagger module mounted for sending and receiving

A list was made of the data swapped between the tagger and computer. This will be vital for anyone who wants to implement a program with this firmware. At this point in the firmware, it should be possible for someone to build a functional laser tag game with the code provided here.

STUFF you can send TO the tagger from your computer
0 0 <0-255> <0-255 > <0-255 > <0-255 >
// This will transmit the four bytes over infrared one time. There are spaces between each byte and the two Zeros in front.

0 1
// This resets the internal timer. This is used for anti-cheating algorithms and not strictly necessary.

1 0 <0-255 > <0-255 > <0-255 > <0-255 > <0-255 > <0-255 > <0-255 > <0-255 > <0-255 > <0-255 > <0-255 > <0-255 >
// Each bye here represents one of the LEDs on the ring. The color is a number from 0 to 255.
// 000 - OFF. For convenience's sake
// 001 - Red
// 063 - Green
// 127 - Blue
// 191 - Back to red
// 192 - Anything higher than 191 is a varying intensity of white.

1 1 <0-255 >
// This time a single byte is used to change the rest of the LEDs.

2 0
// Toggle the laser output. This is on pin A3

2 1
// Toggle the flashlight output. This is on pin 10

// This requests a reading from the analog inputs on the Arduino.

STUFF you can receive FROM the tagger
// A string of 8 HEX characters is an indication that some infrared signal has been received
// There are no spaces in this string.

# # #
// Three decimal values, each from 0-1023. These are the analog values.
// There are spaces between each value.
// This is received by a request (3) or an infrared remote signal.

--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##
##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##
// This mess is the operatorArray, which is the information contained in the last
// transmission from the computer. It is sent by the tagger when requested by an
// infrared remote.

// The trigger switch has been depressed.

// The trigger switch has been released.

// The reload switch has been depressed.

// The reload switch has been released.


The rest of the posts for this project have been arranged by date

First time here?

Completed projects from year 1 
Completed projects from year 2
Completed projects from year 3

Disclaimer for http://24hourengineer.blogspot.com/ and 24hourengineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information in this blog, or linked by this blog, are not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on a post.
This blog, including pictures and text, is copyright to Brian McEvoy.

2017-04-12 (W)