These improved INO files are specifically designed to work with:
- USB Device: Van Ooijen Technische Informatica Free shared USB VID/PID
- VID:PID: 16c0:05e4
- Type: USB MIDI device
- Hardware: ATtiny85 Digispark board
Best for: Most users, first try this one
Features:
- Clean, well-structured code
- Proper debouncing (5ms)
- LED pulse feedback
- MIDI notes: 60 (Dit) and 62 (Dah)
- Full velocity (127) on note on
- Tested timing parameters
When to use: Start with this version. It has the best balance of features and reliability.
Best for: Alternative implementation if first version has issues
Features:
- More modular code structure
- Extended debouncing (8ms)
- Structured state management
- Better code organization
- Diagnostic startup sequence
When to use: If paddle_decoder_vusb.ino doesn't work or you need more structured code for modifications.
Best for: Troubleshooting and debugging
Features:
- Extended LED diagnostics
- Multiple startup patterns to confirm firmware load
- Heartbeat LED (flashes every 10 seconds)
- Both Note Off methods (standard and velocity 0)
- Press counting
- Special "both paddles" indicator
LED Patterns:
- 5 fast blinks = Firmware loaded OK
- 1 long blink = USB initialization
- 3 medium blinks = MIDI ready
- Quick flash = Paddle press detected
- Continuous on = Both paddles pressed
- Brief flash every 10s = Heartbeat (firmware alive)
When to use: When you need to verify that the firmware is loaded and running, or troubleshoot communication issues.
The original paddle_decoder.ino may have issues with:
- MIDI timing
- USB enumeration with specific VID/PID
- Debounce handling
- LED feedback on shared USB pin
- Better Debouncing: Increased from 10ms to configurable values
- Improved MIDI Sending: Uses both NoteOff and NoteOn(velocity=0) methods
- LED Management: Timed LED pulses instead of direct control
- State Tracking: Better state machines for paddle monitoring
- USB Stability: More frequent DigiMIDI.update() calls
- Diagnostic Support: Multiple versions for troubleshooting
# Install Arduino IDE if not already installed
# Add Digispark board support:
# File -> Preferences -> Additional Board Manager URLs
# Add: http://digistump.com/package_digistump_index.json1. Tools -> Board -> Boards Manager
2. Search for "Digistump AVR Boards"
3. Click Install
4. Sketch -> Include Library -> Manage Libraries
5. Search for "DigiMIDI"
6. Install DigiMIDI library
Tools -> Board -> Digispark (Default - 16.5mhz)
- For first attempt: Open
paddle_decoder_vusb.ino - If issues persist: Try
paddle_decoder_alt.ino - For debugging: Use
paddle_decoder_diagnostic.ino
1. Sketch -> Upload
2. Wait for "Plug in device now..."
3. Plug in Digispark USB
4. Wait for upload to complete
5. Digispark will reboot automatically
ATtiny85 Digispark Paddle
βββββββββββββββββ ββββββ
P2 (Pin 2) βββββββ> LEFT contact (Dit)
P0 (Pin 0) βββββββ> RIGHT contact (Dah)
GND βββββββ> Common Ground
P1 (Pin 1) βββββββ> [Optional LED + resistor to GND]
USB Connection βββββββ> Computer USB port
- P2 (Dit): Use internal pullup, LOW when pressed
- P0 (Dah): Use internal pullup, LOW when pressed
- P1 (LED): Can add external LED for brighter indication
- P3/P4: Used by V-USB (don't connect anything)
After uploading, you should see LED blink pattern:
- vusb: 5 fast blinks
- alt: 5 fast blinks + pause + 3 medium blinks
- diagnostic: 5 fast + 1 long + 3 medium blinks
# On Linux:
lsusb | grep "16c0:05e4"
# Should show:
Bus 001 Device XXX: ID 16c0:05e4 Van Ooijen Technische Informatica
# Check MIDI device:
amidi -l
# Should show something like:
Dir Device Name
IO hw:X,0,0 Digispark MIDI# Monitor MIDI messages (Linux):
aseqdump -p "Digispark"
# Press LEFT paddle -> Should see: Note On, note 60
# Release LEFT paddle -> Should see: Note Off, note 60
# Press RIGHT paddle -> Should see: Note On, note 62
# Release RIGHT paddle -> Should see: Note Off, note 62cd /home/developer/rust/paddle_decoder_cross_platform
cargo run --releaseSymptoms: lsusb doesn't show 16c0:05e4
Solutions:
- Try different USB port
- Try USB 2.0 port instead of 3.0
- Check if udev rules are needed (see below)
- Re-upload firmware
- Try the diagnostic version to verify firmware is running
Symptoms: amidi -l shows no device
Solutions:
- Check kernel modules:
lsmod | grep snd_seq - Load ALSA sequencer:
sudo modprobe snd-seq - Check dmesg for errors:
dmesg | tail -20 - Verify VID:PID in
lsusb
Symptoms: LED doesn't flash, no MIDI messages
Solutions:
- Check paddle wiring
- Test with multimeter (continuity test)
- Upload diagnostic version
- Verify pullup resistors are working (measure voltage on P0/P2)
Check: Make sure Rust app is looking for notes 60 and 62, not 1 and 2
Note Mapping:
- Original: Note 1 (Dit), Note 2 (Dah)
- New versions: Note 60 (Dit), Note 62 (Dah)
Solutions:
- Increase debounce time in code
- Add 0.1Β΅F capacitor across paddle contacts
- Check for electrical noise
- Use shielded cable for paddle
If you get permission errors, create udev rule:
sudo nano /etc/udev/rules.d/49-digispark.rulesAdd:
# Digispark ATtiny85 MIDI
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05e4", MODE:="0666"
KERNEL=="midi*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05e4", MODE:="0666"
Reload rules:
sudo udevadm control --reload-rules
sudo udevadm triggerThe new INO files use Note 60 and Note 62 instead of Note 1 and Note 2.
Find (in src/main.rs):
if message.message == 1 { // Dit
// ...
}
if message.message == 2 { // Dah
// ...
}Replace with:
if message.message == 60 { // Dit (Middle C)
// ...
}
if message.message == 62 { // Dah (D note)
// ...
}If you want to keep your Rust app unchanged, edit the INO files:
Change:
#define NOTE_DIT 60
#define NOTE_DAH 62To:
#define NOTE_DIT 1
#define NOTE_DAH 2All versions send standard MIDI messages:
Note On (paddle pressed):
- Status: 0x90 (Note On, Channel 1)
- Note: 60 (Dit) or 62 (Dah)
- Velocity: 127 (full)
Note Off (paddle released):
- Method 1: Status 0x80, Note, Velocity 0
- Method 2: Status 0x90, Note, Velocity 0
(diagnostic version sends both for compatibility)
Start here β paddle_decoder_vusb.ino
β
Works? β
β Great! You're done.
β
No? β
β
Try β paddle_decoder_alt.ino
β
Works? β
β Great! You're done.
β
No? β
β
Try β paddle_decoder_diagnostic.ino
β
Check LED patterns
β
LED blinks? β
β Firmware uploaded OK
β
β Check USB enumeration (lsusb)
β Check MIDI device (amidi -l)
β Check dmesg for errors
β
No LED? β β Re-upload firmware
β Try different USB port
β Check Digispark board
- Arduino IDE installed with Digispark support
- DigiMIDI library installed
- Firmware uploaded successfully
- LED blinks on startup
- Device appears in
lsusbas 16c0:05e4 - MIDI device appears in
amidi -l - LED flashes when paddle pressed
- MIDI messages visible in
aseqdump - Rust application receives MIDI events
- Check LED patterns - Use diagnostic version
- Verify USB enumeration - Run
lsusb - Check MIDI subsystem - Run
amidi -l - Monitor system logs - Run
dmesg -w - Test with aseqdump - Verify MIDI messages
- Check hardware - Test paddle continuity
- Digispark Wiki: http://digistump.com/wiki/
- V-USB Project: https://www.obdev.at/products/vusb/
- MIDI Specification: https://www.midi.org/specifications
- DigiMIDI Library: https://github.com/digistump/DigisparkArduinoIntegration
All three versions:
- Use DigiMIDI library for USB MIDI
- Support VID:PID 16c0:05e4
- Include debouncing
- Provide LED feedback
- Send standard MIDI Note On/Off messages
- Are compatible with the Rust decoder application
Choose the version that works best for your setup!
73! π» DD6DS