Code Monkey home page Code Monkey logo

javino2python's Introduction

Javino Library for Python

This repository provides the Javino protocol for Raspberry boards. Javino is a serial message's error check protocol for exchanging messages between high-end and low-end IoT devices over serial communication.

When a high-level software needs to act in the environment, it is necessary to transmit its command to the GPIO where the actuators are connected, providing a bridge between the software's external actions and the GPIO functions. In the same way, when the high-level software needs to sense the environment, the data perceived by sensors has to be sent.

There are some libraries that use the serial port to deal with one-sided messages. However, these libraries just provide message treatment for one platform side (the environment), leaving the other side to the programmer. The Javino aims to fill this gap because it offers a double-sided communication that provides a higher level of correctness in message exchange.

For this reason, every message is composed of a preamble, a field size and the message content. The preamble is a field composed of four hexadecimal characters that are used to identify the beginning of a message sent by an agent. The field size is composed of two hexadecimal characters that are used to calculate the message extension. Finally, the last field is the message content, up to 255 bytes. The preamble and the field size are used together to avoid errors in the event of a loss of information during the message transmission. For the sake of practice, Javino automatically mounts the message.

Javino Message Format

How to install?

We consider that you are using the last version of chonOS [how to install the chonOS].

1 - Updating and installing deps

Connect via SSH in your ChonOS system and execute the commands below:

echo "deb [trusted=yes] http://packages.chon.group/ chonos main" | sudo tee /etc/apt/sources.list.d/chonos.list
sudo apt update
sudo apt install raspberrypi-kernel-headers chonos-serial-port-emulator jason-cli javino python3-pip -y
sudo reboot

2 - Installing the Javino Library for Python

After reboot, connect in your chonOS (via SSH) again and execute the command below

pip3 install https://github.com/chon-group/javino2python/releases/latest/download/javino-latest-py3-none-any.whl

How to use?

1 Download and execute the Blink GPIO Example

We are considering that your Raspberry Pi has an LED plugged in the GPIO 18, running the chonOS[how to install the chonOS] like the schematic below:

Javino Message Format

Connect in your chonOS (via SSH) and execute the command below

wget https://raw.githubusercontent.com/chon-group/javino2python/main/examples/blink/python/blink.py
python3 blink.py 

If all is correct, your prompt will appears like below:

Javino Message Format

2 Importing an BlinkGPIO multi-agent system example

Using a browser, access the chonIDE embedded in the Raspberry Pi https://YOUR-BOT-NAME.bot.chon.group:3270/

Javino Message Format

Donwnload this multi-agent system example

Import the multi-agent system project in chonIDE

Javino Message Format

3 Executing the example

Javino Message Format

COPYRIGHT

Creative Commons License
Javino is licensed under a Creative Commons Attribution 4.0 International License. The licensor cannot revoke these freedoms as long as you follow the license terms:

  • Attribution — You must give appropriate credit like below:

N. M. Lazarin e C. E. Pantoja, “A robotic-agent platform for embedding software agents using raspberry pi and arduino boards”, in Proceedings of 9th Software Agents, Environments and Applications School (WESAAC 2015), Niteroi: UFF, 2015, p. 13–20. Available at: http://www2.ic.uff.br/~wesaac2015/Proceedings-WESAAC-2015.pdf

Cite using Bibtex
@inproceedings{javino,
	address = {Niteroi - RJ},
	title = {A robotic-agent platform for embedding software agents using raspberry pi and arduino boards},
	url = {http://www2.ic.uff.br/~wesaac2015/Proceedings-WESAAC-2015.pdf},
	booktitle = {Proceedings of 9th Software Agents, Environments and Applications School (WESAAC 2015)},
	publisher = {UFF},
	author = {Lazarin, Nilson Mori and Pantoja, Carlos Eduardo},
	year = {2015},
	pages = {13--20},
	note = {ISSN: 2177-2096},
}

javino2python's People

Contributors

nilsonlazarin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.