Skip to content

Commit 781f4fc

Browse files
committed
Shitloads more reformatting
1 parent 4d0853c commit 781f4fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+571
-399
lines changed

.envrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
layout_uv() {
2+
if [[ -d ".venv" ]]; then
3+
VIRTUAL_ENV="$(pwd)/.venv"
4+
fi
5+
6+
if [[ -z $VIRTUAL_ENV || ! -d $VIRTUAL_ENV ]]; then
7+
log_status "No uv project exists. Executing \`uv sync --frozen\` to create one."
8+
uv sync --frozen
9+
VIRTUAL_ENV="$(pwd)/.venv"
10+
fi
11+
12+
PATH_add "$VIRTUAL_ENV/bin"
13+
export UV_ACTIVE=1 # or VENV_ACTIVE=1
14+
export VIRTUAL_ENV
15+
}
16+
17+
18+
layout_uv

docs/SiNE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Now EMWave has passed here is the clue list:
5858

5959
### Locator ID
6060

61-
![](../images/800px-SiNE_Front_Buttons.jpeg "800px-SiNE_Front_Buttons.jpeg")
61+
![](images/800px-SiNE_Front_Buttons.jpeg "800px-SiNE_Front_Buttons.jpeg")
6262

6363
Each
6464
badge is programmed with a unique ID, that is transmitted about 5 times
@@ -80,7 +80,7 @@ as so no data was collected.
8080

8181
## Sponsors
8282

83-
![](../images/800px-SiNE_Back_Angle.jpeg "800px-SiNE_Back_Angle.JPG")
83+
![](images/800px-SiNE_Back_Angle.jpeg "800px-SiNE_Back_Angle.JPG")
8484

8585
SiNE was only possible thanks to our sponsors:
8686

@@ -96,7 +96,7 @@ SiNE was only possible thanks to our sponsors:
9696

9797
### DevBoards
9898

99-
![](../images/800px-DevBoards.jpeg "SiNE Development Boards")
99+
![](images/800px-DevBoards.jpeg "SiNE Development Boards")
100100

101101
Before designing the final SiNE badge
102102
we built three development boards, not bothered about the looks, they
@@ -109,7 +109,7 @@ the same time as the final badges were produced.
109109

110110
## Badge Hacking
111111

112-
![SiNE Schematic](../images/800px-SiNE_Schematic.png) [full](../images/SiNE_Schematic.png)
112+
![SiNE Schematic](images/SiNE_Schematic.png)
113113

114114
We actively encourage users to hack their badge better and hope the information
115115
provided below will help

docs/TiDAL.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
TiDAL was our 2022 badge, our first foray into tiny badges, and our first badge
2+
with USB-C!
3+
4+
5+
16
To do an OTA Update and get the latest firmware make sure your battery
2-
is charged!
7+
is fully charged - the wifi chip will cause brownouts without the battery attached.
38

49
You may have to get very close to an access point (within a couple of
510
metres) for the WiFi to work. Sorry! The more busy an access point is,
@@ -9,4 +14,4 @@ the more difficulty the TiDAL badge will have communicating.
914
- Firmware Repository <https://github.com/emfcamp/TiDAL-Firmware>
1015
- Hardware Repository <https://github.com/emfcamp/TiDAL-Hardware>
1116
- Flyer
12-
<https://usercontent.irccloud-cdn.com/file/tRv4Lyv4/badge+flyer.pdf>
17+
<https://usercontent.irccloud-cdn.com/file/tRv4Lyv4/badge+flyer.pdf>

docs/TiLDA.md

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
The badge, TiLDA, is being designed and built by Charles Yarnold and Tom Wyatt
2+
3+
## Getting wireless communication working
4+
5+
We use the Mirf library to achieve inter-badge communication. You can download Mirf from http://arduino.cc/playground/uploads/InterfacingWithHardware/Mirf.zip. However, the library has a flaw: it won't compile unless you add #include <arduino.h> to libraries/Mirf/Mirf.cpp.
6+
7+
The resulting lines 52-53 should look like this:
8+
9+
```cpp
10+
#include <arduino.h>
11+
#include "Mirf.h"
12+
```
13+
14+
Also, the ce and csn pins must be changed to match TiLDA's design:
15+
16+
```cpp
17+
Mirf.cePin = A0;
18+
Mirf.csnPin = A1;
19+
```
20+
21+
(you must add these lines to your `setup()` function).
22+
23+
## General overview
24+
25+
The badge must be a great introduction to micro-controllers, get people to interact more than the normally would and also be fun!
26+
27+
### Plan 1 (old)
28+
29+
The plan is to make an arduino based device that during the day encourages you to mingle with other sides of the camp, this will result in other badges being set to the same team as yours. At a set point of the evening the badges change mode into a camp wide came of laserquest, what team will survive?
30+
31+
### Plan 2 (new)
32+
33+
Zombie tag (infected i, humans h, healers he, zombies z) + Wireless Fingerprinting for zones + Heat maps + Domination / Changing the colour of a zone (on the RGB base stations by spending time there as either i, h, he, or z).
34+
35+
## BOM
36+
37+
https://docs.google.com/spreadsheet/ccc?key=0Ah0uj2i4tQJKdHVMM25ZRFpyd2JsUDl6VlNpVkFDb2c
38+
39+
## All code and datasheets
40+
41+
http://github.com/emfcamp/TiLDA
42+
43+
## What pin is X?
44+
45+
```cpp
46+
enum Pins { PIN_LED_BOTH = -1,
47+
PIN_LED_RIGHT = 7,
48+
PIN_LED_LEFT = 4,
49+
PIN_LED_BLUE = 5,
50+
PIN_LED_GREEN = 6,
51+
PIN_LED_RED = 10,
52+
PIN_IR_IN = 11,
53+
PIN_IR_OUT = 3,
54+
PIN_BUTTON = 2
55+
//PIN_NRF24_IRQ = Does anyone know?
56+
};
57+
```
58+
59+
NRF IRQ pin is not connected at all according to the schematic's on GitHub
60+
61+
## Software/Hardware Bugs/Fixes
62+
63+
### Bug 1
64+
65+
The default fuse values interfere with the operation of the wireless module, this can be fixed, provided you have access to an isp programmer by running:
66+
67+
```
68+
sudo avrdude -c <PROGRAMMER> -p m32u4 -U hfuse:w:0xd9:m
69+
```
70+
71+
where you replace <PROGRAMMER> with the name of the one you're using.
72+
73+
Note : the process for installing the successful bootloader described below results in hfuse being set to D8, not D9. D9 sets the reset vector to 0x0000, D8 sets it to the bootloader address. It's possible that d9 partly works, because if the device has been erased execution will eventually reach the bootloader but reprogramming later is likely to prevent this.
74+
75+
### Bug 2
76+
77+
Rx, Tx and pin 13 flashing quickly, device not responding. Need more info, for now, return badge and say it is faulty and try another one. We will look into this and get a patch out.
78+
79+
### Bug 3
80+
81+
Unspecified or other hardware bug. Check battery level. Power cycle the device and try to reflash the
82+
83+
!!! warning "NOTE"
84+
85+
Unlike the Arduino Uno, the reset button needs to be pressed when uploading the sketch for it to upload properly.
86+
87+
Think this is a bug in the way the boot loader and fuse have been done on all the boards, if a board has its bootloader uploaded using the burn boot loader function in the Arduino IDE, the Tilda will then correctly software reset when using uploading a new program. --'RepRap' Matt (talk) 19:29, 1 September 2012 (UTC)
88+
89+
### UPLOAD BUG: Re-burning the Boot loader
90+
91+
Bootloader needs to be refreshed with an ISP programmer for easy using the Arduino IDEs Burn bootloader function
92+
93+
These are the `avrdude` commands taken from the Arduino IDE doing a "Burn Bootloader"
94+
95+
```
96+
avrdude -C/Applications/Arduino 1.0.1.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega32u4 -cusbasp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m
97+
avrdude -C/Applications/Arduino 1.0.1.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega32u4 -cusbasp -Pusb -Uflash:w:/Applications/Arduino 1.0.1.app/Contents/Resources/Java/hardware/arduino/bootloaders/caterina/Caterina-Leonardo.hex:i -Ulock:w:0x2F:m
98+
```
99+
100+
## Coding the badge
101+
102+
You need to create a github account, verify your e-mail address and add an SSH pubkey (generate with ssh-keygen and copy the contents of ~/.ssh/id_rsa.pub) to your github account. This will prevent permissions errors when attempting to download the source from github. Use the following command to check out the repository:
103+
104+
```
105+
git clone --recursive https://github.com/emfcamp/TiLDA
106+
```
107+
108+
To compile and program the board with the default firmware, you need to copy the "TiLDA/source" directory to a directory called "TiLDA", then open the "TiLDA.ino" file from within the Arduino IDE. From within Arduino select "Tools->Boards->Arduino Leonardo" and select the serial port corresponding to your device ("e.g. ttyACM0"). You can then compile and upload the sketch to the board, before pressing upload hit 'reset' on the board for programming to succeed. The default firmware will cycle the L.E.D's once each, and then do nothing, however if S1 is pressed during this cycle a "torch mode" is enabled. Try adding the following code to the "loop()" function to add a L.E.D light show:
109+
110+
```cpp
111+
led_cycle(&lights, PIN_LED_LEFT, 250);
112+
led_cycle(&lights, PIN_LED_RIGHT, 250);
113+
```
114+
115+
You can now begin exploring the additional firmware and libraries. Copy the contents of the "libraries" directory to your "~/sketchbook" folder. A change is required to Mirf.cpp to use the Mirf library, add "include <arduino.h>" to the top line of Mirf.cpp. You can then begin exploring the library examples.
116+
117+
### Howto
118+
119+
1) Download and run Arduino 1.0.1
120+
2) Select Tools -> Boards -> Arduino Leonardo.
121+
3) Select Port -> ttyACM0 (normally) or ttyACM1 or ttyACM2
122+
4) Just Program the board as normal with Examples -> Blink.
123+
5) Note: the board does NOT auto reset when uploading from the Arduino IDE, please push the reset button just after the terminal at the bottom of the IDE says, e.g.:
124+
125+
```
126+
"Binary sketch size: 4,858 bytes (of a 28,672 byte maximum)"
127+
```
128+
129+
The code should then be uploaded as normal.
130+
Active Development of Tilda Code
131+
132+
- We will be releasing some code asap / later this evening with an interactive game.
133+
- https://github.com/emfcamp/TiLDA or https://github.com/emfcamp/TiLDA-source
134+
- Join us on irc channel #emfcamp
135+
136+
### Todo
137+
138+
- Get a (small footprint) working ir lib for the ATmega32u4
139+
- Test existing wireless code with ATmega32u4
140+
- Write base game (this is happening now! join us on #emfcamp on IRC to help)
141+
142+
### Game
143+
144+
To get a working simple version to then build on I propose we:
145+
146+
Make the badges beacon out over ir their team and user id. Record the team ids you see in a rolling buffer. At predetermined intervals, say 5 seconds, each team id you have seen from different users equates to a score, with more users on one team earning less points i.e. 1 unique user on team red = 10 points, 5 unique users on team blue = 5 points. These get added to your current levels for those teams. If one of those levels reaches a determined threshold your badge gets converted to that team.
147+
148+
Should you not see a team id for a certain amount of polls, your counter for them decreases.
149+
150+
Seeing your own team decreases all team counters (but at a low rate as to not effect interchanges)
151+
152+
Your badge should beacon out over 2.4 messages about its colour, who it sees and when it gets converted.
153+
154+
## Contact
155+
156+
The plan is very fluid at the moment, once we have it more locked down we will have more details on the wiki, feel free to join us in #openlasertag on the freenode irc network
157+
158+
## Game mechanics
159+
160+
Everyone chooses a team.
161+
162+
During the day people switch teams.
163+
164+
As you see other people from other teams your counter for their team increases. If this level reaches a certain amount then you switch to their team.
165+
166+
Those levels decay at one rate if that team has not been seen, being with your own team decreases all other levels faster.
167+
168+
## Link Dump / Other Ideas for the badge
169+
170+
- Alternate IR library: http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html (git hub: https://github.com/shirriff/Arduino-IRremote/)
171+
- Tested receiver code with DVD remote control and seems to work, not yet able to confirm working IR send code (possible board problem?) -- SamLR 27-08-2012 01:42
172+
173+
## Build Brighton IR Badge project
174+
175+
- Project Page on Build Brighton Wiki http://www.buildbrighton.com/wiki/Light_Brigade_IR_Badge_Board_and_Soldering_Workshop
176+
- Github page for the badges https://github.com/mikepea/buildbrighton-ir-badge
177+
- IR Badge Zombie Tag rules http://www.buildbrighton.com/images/1/18/BB_Badge_rules.png
178+
- Code for a IR+RGB badge that can talk to other badges: https://github.com/mikepea/white-night-kit/
179+
- Flickr / Badges http://www.flickr.com/photos/andrewsleigh/sets/72157626092949670/
File renamed without changes.
File renamed without changes.

docs/TiLDA_MK3/API/index.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## Built-in
2+
3+
- [documentation](http://docs.micropython.org/en/latest/pyboard/) -
4+
General Micropython library
5+
- [uGFX](ugfx.md) - The TiLDA LCD colour screen
6+
- <a href="TiLDA_MK3/documentation/cc3100" class="wikilink"
7+
title="CC3100">CC3100</a> - The wifi chip
8+
- <a href="TiLDA_MK3/rtc" class="wikilink" title="RTC">RTC</a> (real
9+
time clock)
10+
- <a href="TiLDA_MK3/adc" class="wikilink" title="ADC">ADC</a> (analogue
11+
reading)
12+
- <a href="TiLDA_MK3/timer" class="wikilink" title="Timer">Timer</a>
13+
- Microcontroller peripherals
14+
[1](https://docs.micropython.org/en/latest/pyboard/library/pyb.html)
15+
(Timers, PWM, serial,
16+
<a href="TiLDA_MK3/spi" class="wikilink" title="SPI">SPI</a> etc)
17+
18+
## TiLDA Libraries
19+
20+
On top of the build-in modules above we have also created a bunch of
21+
helpful libraries written in python. If you go through the bootstrap
22+
process or use the App Library you should always have a full set of
23+
those on your badge. If for some reason this isn't the case you can
24+
download our repository from <https://github.com/emfcamp/Mk3-Firmware>
25+
and copy the `lib` folder onto your badge.
26+
27+
TBD, for now please have a look at the libraries themselves:
28+
<https://github.com/emfcamp/Mk3-Firmware/tree/master/lib>
29+
30+
- <a href="TiLDA_MK3/lib/buttons" class="wikilink"
31+
title="buttons">buttons</a>
32+
- database
33+
- dialogs
34+
- filesystem
35+
- http_client
36+
- imu
37+
- wifi
38+
- NTP Example:
39+
<https://gist.github.com/drrk/4a17c4394f93d0f9123560af056f6f30>
40+
- On board LED "<a href="TiLDA_MK3/NeoPixel" class="wikilink"
41+
title="NeoPixel">NeoPixel</a>" example:
42+
<https://github.com/mayhem/tilda-mk3-led-demo>
43+
44+
Full hardware files are on GitHub
45+
[2](https://github.com/emfcamp/Mk3-Hardware)
46+
47+
(feel free to add additional ideas, and create links new wiki pages to
48+
on-going projects, perhaps someone will want to contribute)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)