Instructions to start the Beta testing

gigabrain.io

Beta Install Instructions

Beta install

The current Beta application features recording movements in the gigabrain.io cloud where you can analyze and share the movement. In the beta version only the verified movements are shared.

  • Movement install instructions
    1. Read Instructions

    Read the full instructions and decide if you will be using PiBlaster Software PWM from GPIO pins or PCA9685 external board

    Read : Instructions
    2. Prepare your device

    Movement will use by default the Vorpal configuration for the movements by using a Raspberry Pi as controller board.

    Vorpal : Instructions
    3. Install Movement application

    Install by running the install script in you Raspberry Pi

    Install : Instructions
    4. Test with your Raspberry Pi
    Record a movement - Open the Zoom controlling interface, Write a record name and hit the record button to start recording. Move the controllers as desired.

    Hit the record button again to stop the recording.

    After that switch the tab to Recordings tab and hit the Sync button to upload the recording to the gigabrain.io cloud. Hit the Analyse button to see the analysis of the recording.

    Hit Play button to playback the movement. Switch to Continuous mode with the slider and hit the Play button to start continuous movement.

    After that open up a browser in laptop, phone or a PC and the Movement dashboard page to browse all recordings. Movements : Movement dashboard
    5. License
    When you share a movement to the gigabrain.io cloud you agree on the following License terms regarding the movement's data License : Creative Commons Attribution License
    6. Feedback
    Write open Feedback how did the test succeed? Did you record any movements and upload them? Any suggestions to the analysis? Write : Feedback
    7. Plan new movement
    In the beta test you can plan your own movement in an planning Excel and you can send the Excel as attachment with email to info@gigabrain.io and ask to add the movement. Plan : Download movement planning Excel

Currently tested with versions Raspberry PI 3 B V1.2 model. Raspbian 4.9 Please test with your Raspberry device and send feedback.

How to install with a script ?

DOWNLOAD INSTALL SCRIPT

Download the Install script in your Raspberry Pi Terminal Console window in your home folder and run it with an example below.


wget http://gigabrain.io/demo/movement/GigaBrainInstallMovement.sh -O ~/GigaBrainInstallMovement.sh
chmod +x ~/GigaBrainInstallMovement.sh
~/GigaBrainInstallMovement.sh

The service start takes around 40 seconds. Wait for that amount at least. You can use the following command to see from the log when the service has fully started. tail ~/gigabrain/logs/movement.log

In the HOME folder the script creates folder ~/gigabrain downloads the GigaBrain Movement version and creates two scripts for running the service. The log files are created in ~/gigabrain/logs You can launch the Movement version with script startMovement.sh or PCA9685_startMovement.sh The service runs in a port 5800, open up a web browser http://RPI_IPADDRESS:5800 or http://localhost:5800

GigaBrain Source code uses the following library dependencies: Spring Boot, Pi4J, Angular

How to install manually ?

Download newest version movement-0.0.2-SNAPSHOT.jar

How to connect with PCA9685 board ?

Setup suggestion for Micro Servos

Connect the PCA9685 board to Raspberry Pi with these instructions.

Adafruit Raspberry Pi PCA9685 instructions

Enable the I2C to connect with the PCA9685 board

Enable I2C on Raspberry Pi
In the Movement version it is possible to use one PCA9685 board that has the default board number 40 (no address connectors soldered shut)

The configuration parameters for PCA9685:
CONTROLLING_ENABLE_PCA9685 = Boolean (true or false) Turn on PCA9685 configuration
CONTROLLING_PCA9685_OUTPUT_TAGS = String separated with , List the hashtags that are mapped to pins in the same order as PINS (not used in demo), default r1,r2,r3,r4,r5,r6,r7,r8,r9,l1,l2,l3,l4,l5,l6,l7,l8,l9
CONTROLLING_PCA9685_OUTPUT_PINS = Integer List the pin numbers that are mapped to output GPIO ports in the same order as TAGS (not used in demo), default 0,1,1,2,3,3,4,5,5,6,7,7,8,9,9,10,11,11
CONTROLLING_USERNAME = String User interface username
CONTROLLING_PASSWORD = String User interface password
CONTROLLING_STOPTIME = After the movement cycle how long to wait before the movement stop signal is sent, default 500 ms 
CONTROLLING_DELAYTIME = How much delay there is between single movements, default 10 ms
CONTROLLING_SHUTDOWNTIME = How long the controller is on from the last control movement, default 300000ms 5min

java -jar ~/gigabrain/movement-0.0.2-SNAPSHOT.jar --CONTROLLING_ENABLE_PCA9685=true --CONTROLLING_USERNAME=john --CONTROLLING_PASSWORD='{bcrypt}$2a$10$AkKVjmFjr.eTCxiUK5XGr.iD/lFSfs64gU7LhcNz2NbOVAKh0Zp6i' > /home/pi/gigabrain/logs/movement.log 2>&1 &  

How to connect with PiBlaster ?

Setup suggestion for Micro Servos (DEMO version uses pins 4,17,18,27,21,22,23,24)

Install the PiBlaster from

https://github.com/sarfata/pi-blaster
PiBlaster by default has 9 output GPIO pins 4,17,18,27,21,22,23,24,25 and the default PWM output is 100Hz 
using one GPIO pin verified by testing with an oscilloscope.
If you are running with Pi Blaster make sure that you do not use any GPIO pins for input devices.
The reserved GPIO pins for output are 4,17,18,27,21,22,23,24,25
Note that you have to restart the Raspberry Pi Raspbian or shutdown the operating system or 
the application from the interface "Shutdown" Button to release the output GPIO pins for other use. 
Do not attach any input sensors or other devices to these output reserved GPIO pins
unless you have restarted the Raspberry Pi.
You can also release the PiBlaster pin by calling release for the pin number from command line:
echo "release 4" > /dev/pi-blaster
echo "release 17" > /dev/pi-blaster
echo "release 18" > /dev/pi-blaster
echo "release 27" > /dev/pi-blaster
echo "release 21" > /dev/pi-blaster
echo "release 22" > /dev/pi-blaster
echo "release 23" > /dev/pi-blaster
echo "release 24" > /dev/pi-blaster
echo "release 25" > /dev/pi-blaster


The configuration parameters for PiBlaster pins:
CONTROLLING_ENABLE_PIBLASTER = Boolean (true or false) Turn on Raspberry Pi PiBlaster configuration
CONTROLLING_PIBLASTER_OUTPUT_TAGS = String separated with , List the hashtags that are mapped to pins in the same order as PINS (not used in demo), default r1,r2,r7,r8,l1,l2,l7,l8
CONTROLLING_PIBLASTER_OUTPUT_PINS = String separated with , List the pin numbers that are mapped to output GPIO ports in the same order as TAGS (not used in demo), default 4,17,18,27,21,22,23,24
CONTROLLING_USERNAME = String User username
CONTROLLING_PASSWORD = String User BCrypted password 
CONTROLLING_STOPTIME = After the movement cycle how long to wait before the movement stop signal is sent, default 500 ms 
CONTROLLING_DELAYTIME = How much delay there is between single movements, default 10 ms
CONTROLLING_SHUTDOWNTIME = How long the controller is on from the last control movement, default 300000ms 5min

Run command:
java -jar ~/gigabrain/movement-0.0.2-SNAPSHOT.jar --CONTROLLING_ENABLE_PIBLASTER=true --CONTROLLING_USERNAME=john --CONTROLLING_PASSWORD='{bcrypt}$2a$10$AkKVjmFjr.eTCxiUK5XGr.iD/lFSfs64gU7LhcNz2NbOVAKh0Zp6i' > /home/pi/gigabrain/logs/movement.log 2>&1 &

The pins to control for PiBlaster in this DEMO version is 18, GPIO pins 4,17,18,27,21,22,23,24. The user interface has 18 controls, 9 for right and left side. The pins to control for PCA9685 in this DEMO version is 18, one board in 0x40 bus is configured automatically. The user interface has 18 controls, 9 for right and left side.

How to Generate a BCrypt password hash ?

Create a BCrypted password manually
	in Command line see reference BCrypt Hash from command line
	in browser JavaScript Browserling Javascript BCrypt tool
	Notice that Browserling uses a local JavaScript BCrypt script
	BCrypt JavaScript library
and add a {bcrypt} in front of the property eg. --CONTROLLING_USERNAME=john --CONTROLLING_PASSWORD='{bcrypt}$2a$04$dl...' In the above run command example username is john and password is "hello"

How the application security is implemented ?

The security is implemented using standard Spring Security libraries to ensure the security and stability of the application.

How to setup configuration for your robot ?

The DEMO version has Two controllers one for right side (r1 - r3) and one for left side (l1 - l3) for X, Y and Z directions.
Actual GigaBrain controller touch interface has 3 controllers on right (r1 - r9) and 3 controllers on left (l1 - l9) for X, Y and Z directions. 

Example configuration for Vorpal robot in DEMO for PCA9685

The image shows first the Controller movement id then the PCA9685 board pin number and then Vorpal leg number
Controller movement id = PCA9685 board pin number -> Vorpal leg number

Example configuration for Vorpal robot in DEMO for PiBlaster

How to use GigaBrain ?

Make sure that you have Raspbian 4.9 installed on your SD card Install the newest Raspbian official installation

Share the Wifi hotspot with iPhone or iPad, Android phone or tablet, PC with a touch screen and after that connect your Raspberry Pi to the same Wifi with your mobile phone

You can also connect your touch screen and Raspberry Pi with the same Wifi hotspot device, as long as the devices see each others IP addresses.

One option also is to create a Wifi hotspot with your Raspberry Pi and connect your mobile device to that Wifi. This is an advanced option

Find the IP address of your Raspberry Pi with Command line command: host raspberrypi

Install GigaBrain to your Raspberry Pi and setup the device. If you are running with Pi Blaster make sure that you do not use any GPIO pins for input devices. The reserved GPIO pins for output are 4,17,18,27,21,22,23,24,25

Open up the browser from your mobile phone and type the address for example: http://192.0.1.23:5800 Make sure that the port number :5800 is added after the IP address of your Raspberry Pi

Log in with the same username and password that you installed GigaBrain with and start your show!

Stop the application with the interface "Shutdown" button or restart your Raspberry Pi Operating system before using any input pins for other devices.

Questions or comments ?

info@gigabrain.io