Skip to main content

Amiga SDK Examples

CircuitPython Examples​

info

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

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.

Record and Access data​

This tutorial walks you through recording field data and offloading it to your local machine.

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.

Brain App Tutorials​

These are the examples for ready-to-run apps and learning how you can develop your own custom applications for the farm-ng Brain.

tip

The tutorials build off of one another and are better when followed in order.

00 - Tutorial Introduction​

This tutorial introduces necessary background knowledge and walks you through the amiga-app-template.

The topics covered in this tutorial include:

  • Creating kivy applications
  • GRPC / asyncio application development

01 - Camera Streamer Tutorial​

This tutorial is designed to teach you to implement the OakCameraClient in a GUI application using Kivy following along the camera-streamer example application built using the amiga-app-template.

The topics covered in this tutorial include:

  • Creating kivy applications
  • GRPC / asyncio application development
  • Streaming an Oak camera with the camera client

02 - Virtual Joystick Tutorial​

This tutorial is designed to enable you to develop your own custom applications that uses camera streams and controls your Amiga over the CAN bus following along the virtual-joystick example application built using the amiga-app-template.

The topics covered in this tutorial include:

  • Creating kivy applications
  • GRPC / asyncio application development
  • Streaming an Oak camera with the camera client
  • Streaming Amiga state information with the canbus client
  • Auto control mode of Amiga robot with the canbus client

Developing Custom Applications​

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.