Skip to content

NEW Totem Arduino Framework

We have released Arduino implementation built for RoboBoard X4. Now you can simply install Totem framework to and start programming without any additional configuration or setup. Whole environment is built around X4 board to bringing better user experience, full functionality and extensive objective API to control modules and board itself. TotemLibrary is no more required!

Example of new programming API
// Initialize modules
Module14 line; // Line follower module
Module15 pot;  // Potentiometer module
// Initialize program
void setup() {
  // Empty
}
// Loop program
void loop() {
  // Receive Potentiometer module knob positions
  int knobA = pot.knobA.get();
  int knobB = pot.knobB.get();
  int knobC = pot.knobC.get();
  // Display Knob A position on Line Follower module
  line.led.off();
  line.led.onX(
    map(knobA, 0, 255, 0, 7) // map [0:255] -> [0:7]
  );
  // Change RoboBoard X4 RGB color depending on Knob A, B positions
  X4.rgb.color(
    knobB, knobC, 255-knobC, 0 // alpha, reg, green, blue
  );
  // Delay 20 milliseconds
  delay(20);
}

See what changed

  • Integration with Arduino IDE (install trough Board Manager)
  • Select Totem App connectivity in Arduino IDE context menu (Tools -> App control)
  • Totem.X4.begin() is no more required. Can compile empty sketch
  • #include <Totem.h> is no more required.
  • Easy to use objective API. Perfect with autocomplete feature
  • New code examples for each module and their functionality
  • New events system
  • Add more loop() functions with addLoop()
  • RoboBoard X4 driver chip updater (Burn Bootloader)
  • New RoboBoard X4 features:
    • Config DC motor to play tones (sounds)
    • Change DC motor frequency
    • Control Servo motor speed
    • Create RGB fade animations
  • Integration with PlatformIO (just select RoboBoard X4 from the list)
  • Setup guide for Arduino IDE and PlatformIO
  • Documentation for new objective API
  • Fix MEMS example crashing

This is pre-release version, so few things are still missing out. Later this documentation site will adapt new changes.

Setup guide

Step 1: Install Arduino IDE.
Go to download page to install Arduino IDE.

Step 2: Install Totem Boards.

  1. In Arduino IDE select FilePreferences.
  2. Locate Additional Boards Manager URLs and add:
    https://totemmaker.github.io/TotemArduinoBoards/package_totemmaker_index.json
  3. Click OK.
  4. Select ToolsBoardBoards Manager..
  5. In search field type totem (find Totem Boards).
  6. Click Install and wait for it to complete. It can take a few minutes.
  7. Close Boards Manager window.
Step 5: Select board.
Select ToolsBoardTotem BoardsRoboBoard X4.
Step 7: Connect X4 board.
Connect X4 board to PC over USB cable and power it on.
Make sure the battery or DC jack is connected and power switch is turned on.
X4 is not powered from USB alone!
Step 8: Select port.
Select ToolsPort and click on the port displayed there.
If Port is not available - check if X4 is on and plugged to PC with USB cable.
If there are multiple ports, disconnect USB cable and check which one is gone. Reconnect and select it.
Step 6: Update internal driver to latest version.
Select ToolsBurn Bootloader.
Wait till board updates itself and turns RGB LED green.
Only required once to access new functionality!
Step 6: Load example code.
Select FileExamples> BoardLEDLedBlink.
A new window with example code will open.
Step 9: Compile and upload code.
Select SketchUpload and wait till it completes (can take a few minutes first time).
After completion LED should start blinking (different patterns).

If encountered any issue - create a topic to resolve it.

Getting started

Until documentation is ready, you can find some information inside header files of repository: