Compile teensy

From Rsewiki
Jump to: navigation, search

Back to Flexbot main page

Contents

Introduction

As all code is located and updated through the git repository, it necessary to have a set of standard instructions on how the code is brought to the NUC, compiled and uploaded to the Teensy.

It is advised that the code on the NUC stays untouched as it both is somewhat difficult to maintain and edit the code from the NUC and you most likely will forget to commit and push the changes to the git repository when you are done. Then the git repo will fall out of sync, you head will explode trying to fix it and Flexbot will run away (if it could). So change the code locally on your PC/laptop and follow this guide to get it running on Flexbot.

Pulling the code from the NUC

Start by connecting the NUC to the internet via ethernet. You might have to reboot before it actually has connection. Join the NUC network with

ssid: NUC
pw: grenen89

ssh with X into the NUC by

ssh -x local@10.42.0.1

or use a screen and keyboard connected to it. X isn't tested on the NUC - if it isn't supported go ahead and install it for others to enjoy. Go to

~/flexbot

and type

git pull

if you get any errors it is probably one out of two things, or both:

  • You forgot to restart after connecting the ethernet.
  • Someone changed the code on the NUC and did not commit and push.

If the latter is true, type

git reset --hard

and try pulling again.

Compiling Teensy code

Now that a new version is pulled onto the NUC, go to the folder

~/flexbot_deploy

and compile the code by

make

Uploading to Teensy

From the folder

~/flexbot_deploy

open up the Teensy application by typing

./teensy

Push the button on the Teensy located in the Flexbot leg, and upload the code from the Teensy application.

Closing Remarks

It is always recommended to completely reboot the power supply to the Flexbot leg after uploading the code. The IMU's are known to sometimes have issues after the Teensy have rebooted and they have not. So to be safe, just kill the power to the hardware and turn it on again.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox