jmccorm
Well-Known Member
- Thread starter
- #121
I'm trying my hand at a 'friendly get your attention' honk (as opposed to a long blaring honk). I don't think I have the cadence quite right. Everyone is welcome to try optimizing this 'nicehonk' script.
I was thinking of it automatically triggering when I flashed my brights?
I was thinking of it automatically triggering when I flashed my brights?
Bash:
#!/bin/bash
# An attempt at a polite attention-getting honk.
# Caedence feels wrong. Still seems a bit angry.
# Maybe someone can optimize our horn pattern?
# In case the CAN bus is asleep, we need to wake it up with a message.
# We're telling it that no button was pressed, which does the job nicely.
cansend can0 2D3#0700000000000000 ; sleep 0.1
# Change to an extended diagnostic session.
# We need this in order to access and change the horn.
cansend can1 620#02.10.03.00.00.00.00.00 ; sleep 0.1
# Honk 0.05 seconds, rest 0.05 seconds
cansend can1 620#05.2f.d0.ad.03.01.00.00 ; sleep 0.05
cansend can1 620#05.2f.d0.ad.03.00.00.00 ; sleep 0.05
# Honk 0.15 seconds, rest 0.10 seconds
cansend can1 620#05.2f.d0.ad.03.01.00.00 ; sleep 0.15
cansend can1 620#05.2f.d0.ad.03.00.00.00 ; sleep 0.10
# Honk 0.05 seconds, rest 0.10 seconds
cansend can1 620#05.2f.d0.ad.03.01.00.00 ; sleep 0.05
cansend can1 620#05.2f.d0.ad.03.00.00.00 ; sleep 0.10
# Honk 0.05 seconds, rest 0.10 seconds
cansend can1 620#05.2f.d0.ad.03.01.00.00 ; sleep 0.05
cansend can1 620#05.2f.d0.ad.03.00.00.00 ; sleep 0.10
Sponsored
