If you're not familiar with Daytripper yet, please see the Quick Start Guide first.
Instead of hiding windows, you can perform custom actions when TX is triggered.
Slide the Mode Select
Switch on RX to CUSTOM
, middle position. Now ALT + PAUSE
will be pressed when TX is triggered.
This key combo normally doesn't do anything, but you can capture it with a software and then perform your own actions.
You can use autohotkey. Check out the official tutorials, and here's a sample configuration file upon which you can tinker with.
Go to System Preferences
-> Keyboard
-> Shortcuts
-> App Shortcuts
You can then add a shortcut to launch an application, or execute an applescript:
Of course there's always bettertouchtool as well.
Oh I'm sure you'll figure it out 😉
Daytripper uses a nRF24L01-compatible chip called Si24R1. It is much cheaper, and actually has a higher TX power output, resulting in longer communication range.
Daytripper operates at channel 115
, address 0xDA 0xBB 0xED 0xC0 0x0C
.
Data rate is 250kbps
, TX power is +7dBm
, Auto Acknowledgment
is used.
Daytripper TX sends 6-byte packets, details below:
-
The first byte (byte 0) is a unique identifier calculated from the microcontroller serial number.
-
Second byte (byte 1) denotes what this packet is about. It can be either a test packet, trigger packet, or status update packet.
-
The rest 4 bytes are payloads, the meaning depending on the command type.
-
For a
Test
packet, the 4 bytes are the same incrementing sequence number repeated 4 times. -
For a
Trigger
packet, the first two bytes are the baseline reading of the power-up calibration. And the last two bytes are the actual distance reading. Unit in mm. -
For a
status
packet, the first two bytes are the latest battery voltage reading in mV. The last two bytes are the time-since-power-on count, multiply it by 5 to get the number of seconds elapsed since TX power-on. -
The
vbat_mV
is about 300mV lower than the actual battery voltage, due to the diode drop.
There is a user button on both TX and RX board. Usually they are unused:
For TX, a short press (less than 2 seconds) recalibrates the baseline. A long press (more than 2 seconds) enters Test Mode, where it sends test packets with incrementing sequence number as payload every second. It can be used to test communication range. Turn it off then on again to exit Test Mode.
For RX, a press on the button types out some debug messages. Make sure you open a text editor first.
You can update Daytripper's firmware via USB, for bug fixes and and/or new features.
To do this, download and install the STM32 DfuSe tool from the official website. Or if you don't want to give them your email, you can download it from this repo.
To update firmware, make sure the board is powered off, then press and hold down the user button while plugging it into a computer
.
If it all goes well, the status LED would stay off, and you will see a STM Device in DFU Mode
in Device Manager:
Then you can launch the DfuSe Demo
software:
Press the Choose...
button and select a firmware file in .dfu
format. Make sure it's the correct file!
Press Upgrade
button to start uploading the new firmware into the microcontroller.
And now the firmware is being updated!
It could take anywhere between a few seconds to a few minutes. Try using different USB ports if it is particularly slow.
After uploading is complete, unplug and turn it back on to start using the new firmware.
If you generated a .hex
file yourself, you can convert it to a .dfu
file with the Dfu file manager
and then upload this way.
This method is nice for occasional firmware updates, but quite cumbersome if you want to do extensive reprogramming. It's faster to get a ST-Link programmer and use the Keil uVision IDE. See this guide for more information on STM32 developments.
Daytripper wasn't designed with multiple TX/RX boards in mind. And I haven't done any extensive testings on this subject.
In this scenario RX will react when ANY of the multiple TX fires.
Here ALL of RX will react when TX fires.
Untested, probably a mess.
Please feel free to open an issue. This is the preferred way since it helps other people too.
You can also email me at dekunukem gmail com
for inquires.