Following isntructions have been logged for teensy41; however, other boards would have similar installation steps.
- Create udev rules for Teensy on the powering computer/local machine if not already present
$ cd /etc/udev/rules.d/
$ sudo touch 00-teensy.rules
$ sudo gedit 00-teensy.rules
- Copy the UDEV Rules for Teensy boards. More details for Teensy loaders can be be found at - Using The Teensy Loader on Ubuntu Linux
- Install rosserial
$ sudo apt install ros-melodic-rosserial-arduino
$ sudo apt install ros-melodic-rosserial-client
- Clone the repo to your local machine
git clone http://192.168.1.101/distributed-wta/wta_led_teensy.git
- Build the catkin package
- Open the led.ino file in Arduino IDE
- Select the correct board.
Tools → Board → Teensyduino → Teensy 4.1 - Upload the code to Teensy.
- Run following command in the terminal
roslaunch wta_led_teensy led.launch
- In split terminal, run following command and change data values to see different behavior
rostopic pub /assignment std_msgs/Int64 "data: 2"
The data value assignment is as follows if pins are connected the correct way:
Pin 13: White LED | Weapon 1
Pin 39: Red LED | Weapon 2
Pin 36: Blue LED | Weapon 3
Pin 33: Yellow LED | Weapon 4
Note: Pins are chosen arbitrarily.
# | Problem | Solution | Notes |
---|---|---|---|
1 | error: cannot convert 'usb_serial_class*' to 'HardwareSerial*' in assignment iostream = &Serial; |
append || defined (__IMXRT1062__) to AdruinoHardware.h |
github: Teensy 4.0 Support #455 |