Skip to main content

Arduino

by BCMI labs

Arduino

A simple way to connect with Arduino's GPIO, including INPUT and OUTPUT. FEAGI will activate or read it. This is designed to help you create your own project using Arduino. This is open to endless ideas.

Specifications

Manufacturer
BCMI labs
Type
Arduino
Environment
Physical hardware
Category
Microcontrollers

Getting started

How do I start?

There are two different methods: manual activation and circuit design. To activate a specific coordination of the cortical, press Shift on your keyboard and click to display the green box. Once the green box is visible, press the spacebar to activate it manually. You can do shift and clickon the green box to unselect the box. To press del (fn + del for mac) would deselect all selected boxes. For circuit design, you can use connectivity rule and quick connect. connectivity rule like a rule, while quick connect is like a connectivity. Using connectivity rule, you can design a circuit and confirm the information is sent from one cortical area to another. This can be automation as well. Certain cortical areas handle specific actions.

Table of capabilities and connected cortical areas

ActionCortical Input/OutputBrief description
ReadGPIO InputIn GPIO Input (x,0,0), it's similar to digital read. The 'x' would be based on the pin.
OutputGPIO OutputIn GPIO Output (x,0,0), it's similar to digital write. The 'x' would be based on the pin.

Description & finding relevant cortical areas

The Arduino uses the GPIO Input and GPIO OUT cortical areas.

You can move around in the brain visualizer by clicking and dragging, and zoom in or out using your mouse's scroll.

If you do not see one of the needed cortical areas, perform the following steps:

  1. Click the + beside the Cortical Areas menu at the top of the brain visualizer
  2. Click Output
  3. Select the cortical area you want in the Select an output type dropdown and click Add
  4. Now you should see the area in the brain visualizer.

How do I start?

There are two different ways to test Arduino via FEAGI: manual activation and circuit design.

Manual activation is simply activating the relevant cortical area yourself to control the GPIO. Circuit design, on the other hand, will allow FEAGI to learn to use Arduino autonomously.

Manual activation

To stimulate the game action associated with a cortical area, press shift on your keyboard and click a box. It will turn green. Then, press the spacebar to activate it manually.
  • Select a box: shift + click
  • Deselect a box: shift + click again
  • Deselect all boxes: del (fn + del for Mac)

Note, spacebar will activate ALL currently selected cortical areas, so if you want to perform just one action, deselect the others.

Connecting to FEAGI

For Windows, Linux or Mac with Arduino and FEAGI

"1) git clone https://github.com/feagi/controllers.git 2) cd controllers/embodiments/arduino/pyfirmata 3) python3 -m venv venv (python -m venv venv for windows) 4) source venv/bin/activate (Windows: venv/Scripts/activate) 5) Run python using below:
  1. mac/linux users:
    1. pip3 install -r requirements.txt
    2. python3 controller.py --api_key "" (replace without removing the quotes in the command).
  2. Windows users:
    1. pip install -r requirements.txt
    2. python controller.py --api_key "" (replace without removing the quotes in the command)."

Quick steps for experienced and advanced users

  1. python3 controller.py

Requirements:

  1. python 3.8+
  2. Magic link (you can find this from NRS)
  3. CMD (WINDOWS) or Terminal (MAC OR LINUX)
  4. Arduino
  5. Git (https://git-scm.com/downloads for windows. Mac and Linux should have it by default)

Tested on Mycobot version:

Arduino UNO

View marketplace for this embodiment · Back to embodiment explorer