Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino example code for button bolt on #10

Open
brentpicasso opened this issue Sep 25, 2024 · 0 comments
Open

Arduino example code for button bolt on #10

brentpicasso opened this issue Sep 25, 2024 · 0 comments
Assignees

Comments

@brentpicasso
Copy link
Contributor

Report button state to console

In a loop, print the button states to the serial console

Report button state via CAN bus

Periodically (10Hz) report all button states via CAN bus
CAN protocol

  • CAN ID (pick an ID)
  • message payload:
    • byte 0: button 1 state (pressed = 1, not pressed = 0)
    • byte 1: button 2 state (pressed = 1, not pressed = 0)
    • byte 2: button 3 state (pressed = 1, not pressed = 0)
    • byte 3: button 4 state (pressed = 1, not pressed = 0)

Send CAN message via button state change

Broadcast a CAN message when a button is pressed
CAN protocol

  • CAN ID (pick an ID)
  • message payload:
    • byte 0: Button ID (0=1, 1=2, 2=3, 3=4)
    • byte 1: Button state (pressed = 1, not pressed = 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants