Skip to main content

Amiga SDK Examples

Version Compatibility

The examples in this documentation may change with each release of the farm-ng-amiga software. Some examples might use methods that are not yet released.

  • To run the latest examples, you should build the software from the source. Clone the repository and run pip install . within the cloned directory.
  • To use examples compatible with the stable release, simply install the released version using pip install farm-ng-amiga.

For more information, please see Brain ADK Install

Microcontroller Examples

info

These are the examples for developing programs for the farm-ng microcontroller kit.

These examples are programmed in CircuitPython.

Before attempting any of these examples make sure you have already cloned the amiga-dev-kit repository, If you have not follow the instructions listed here

Hello World Auto-mode (hello_main_loop)

Link to hello_main_loop/code.py

tip

It's recommended to start with this example before proceeding to any of the others.

This introductory example covers getting set up, interacting with the Amiga, and using auto-control mode to drive your Amiga from a computer using the farm-ng microcontroller kit.

This example enables driving the Amiga by entering simple fwd / rev / left / right keyboard commands the serial port, which the app sends over the CAN bus.

Topics:

  • Serial port 101
  • Auto-mode control

Cansniffer

Link to cansniffer/code.py

This basic example covers a simple tool for listening to all CAN Id's streaming on the bus and measuring simple statistics about the streamed messages. The example is inspired by the cansniffer command line tool from can-utils.

Topics:

  • CAN introduction

FPV

Link to FPV/code.py

This example shows how to connect off the shelf FPV equipment to your Amiga to enable realtime video streaming and teleoperation through remote control. This makes the Amiga remotely operable from the comfort of your office (or cab of your truck) and we're pretty psyched by how low cost and practical FPV control of the Amiga is.

Topics:

  • Hardware integration
  • Auto-mode control

Other examples

Bumpers

Link to bumpers/code.py

The bumpers example shows how to use the experimental safety device API on the Amiga dashboard. Since this is still experimental, it's not documented as a full example until the safety devices API is released as a stable feature in the dashboard firmware.

NOTE: We're targeting the v0.1.9 release for this feature, with a planned date in April 2023.

In the meantime, we'll still link the README and code for the bumpers example to get you inspired about how easy it will be for you to develop your own safety devices to add them to your Amiga!

Brain ADK Examples

info

These are the examples that run on your personal computer for interacting with recorded logs and active services running on the Amiga Brain.

Before getting started with any brain examples, you should install the farm-ng Brain ADK package.

Events Recorder

Link to event_recorder/main.py

This example records events from the Brain using the EventClient class.

File Reader

Link to file_reader/main.py

This example reads log files and plays their contents.

File Reader CAN

Link tofile_reader_can

This example reads the Can data from recorded logs and prints it out.

Camera Client

Link to camera_client/main.py

This example acts as an OakCameraClient in a standalone Python script.

Developing Custom Applications

deprecation warning

This is out-of-date for brains running v2.x Amiga OS software.
This tutorial only applies to brains running Amiga OS v1.x versions.
Please check back for an updated tutorial for brains running v2.x Amiga OS software.

This takes you through the steps of creating your own app with the use of an app template and deploying and testing it on the Amiga.

Amiga ROS Bridge

deprecation warning

This is out-of-date for brains running v2.x Amiga OS software.
This tutorial only applies to brains running Amiga OS v1.x versions.
Please check back for an updated tutorial for brains running v2.x Amiga OS software.

This takes you through the steps of setting up the Amiga ROS bridge for controlling the Amiga robot using your existing ROS nodes.

Not seeing what you need?

Reach out to us by creating a Documentation Request based on the instructions on our support page.