Skip to content
Ferandal edited this page Apr 11, 2018 · 9 revisions

Arduino Firmware

The standard PWM frequency in the Arduino library is set to be in the human hearable range. We recommend patching it in the IDE.

##Setup -Clone Repository -Install Node if not already installed -Run node /Utils/GenerateHardwareConfig.js```` -Install Arduino IDE if not already installed -Download under Boardmanagment the "Arduino SAM Boards (32-bits ARM Cortex-M3)" -Edit the PWM Settings (https://folk.uio.no/jeanra/Microelectronics/GettingTheBestOutOfPWMDue.html) -compile the serial.c file -run ./serial /dev/[your usb port]```to read values

For the usage of the Arduino Seriell Monitor be sure to use the right usb-port and the right baud value (115200) If there is no output, be sure that you only have one console active. For Macusers you can check in systempreferences for network devices if the due board is there and may delete it and replugg the devise.

Position Based Protocol

  • Index 0: Upper panto
  • Index 1: Lower panto

Receiving

6x 32 bit little endian floats, 2x (for each panto):

  • X-Axis (linear mm)
  • Y-Axis (linear mm)
  • Knob (angular radian)

or (about 1s interval) the hardware config MD5 hash value: 16 bytes.

Sending

1 byte panto index followed by 3x 32 bit little endian floats:

  • X-Axis (linear mm)
  • Y-Axis (linear mm)
  • Knob (angular radian)
Clone this wiki locally