Arbalet MEKI (en)

The Arbalet MEKI project is a project that we will carry out for 1 month as part of our DAWIN license (Web Application Development), to enrich the Arbalet project and make the use of Arbalet tools even more fun and easy.

We are 5 students and we will create an application (Arbalet Meki Live) allowing a lay audience to program an Arbalet equipment using an easy-to-use graphic language.

  • The graphic language previously used was Snap! we will switch to Blockly technology and recreate blocks adapted to Arbalet lighting equipment.

  • Creating a multi-platform application (Windows, MacOs, Linux), the choice of ElectronJS technology seems judicious for its development.
    The application will also offer a client-server model: a teacher with the server application while students use the client application. The teacher could then choose who has the control on the Arbalet Lava light table and retake control at any time.

  • Replacement of the Arduino microcontroller by an ESP32 microcontroller that will provide Bluetooth (BLE) support and WIFI connection to Arbalet equipment.

  • Development of a mobile application (Android and IOS) allowing to interact with a device via Bluetooth (BLE). The main expected functionality consists of a “controller” simulator (game controller) to play games running on Arbalet. Thus a smartphone could replace the wired controllers that are currently in use. ( Recovery and adaptation of the controller application created as part of the Arbalet St-Jean project)

The project began on Monday, February 4 and ends for us on March 8.

A look back at the beginning of the project (1):

1. Understanding and defining the project framework

Interview with 2 professors of our license to explain our project 20 min.

Exchanges with Yoan Mollard in order to clarify the areas of uncertainty and thus be able to launch the project.

Processing of the information given to us, classification and processing.

2. Project Management

In order to know what to do and what is the order of importance, we have set up a backlog as a team

Creating diagrams :

  • Activity diagram

  • Sequence diagram

  • Use case diagram

3. Creation of models

  • Model for the teacher administration interface (Crossbow application Meki Live)

  • Template for the graphical programming interface for students

4. Preparation of the demo phase on Monday morning, February 11

  • The Arbalet Meki application starts the server and sees the sessions that connect to it.

  • Launch a program from the ESP32 (microcontroller) to turn on the lights of the light table (Arbalet Lava)

  • Switch on a led thanks to its phone and the Bluetooth connected to the ESP

**Start of sprint 1
The first week of the project ended with the realization of two models, the integration of a first page and the implementation of the first function of our ElectronJs application (allowing computers to access and connect to the server of the teacher’s computer), we also performed all the project management part (backlog, diagrams and task distributions), changed the arduino microcontroller by an ESP32 microcontroller.

**First phase of demos this morning
For this morning’s demonstration we did two demonstrations, one of which was to show that we had successfully launched a program initially designed for an Arduino microcontroller on an ESP 32 to launch light sequences on the Arbalet Lava table (programmable light table).

  • On the positive side, the LEDs light up

  • Negative point: some leds had a strange behavior

The second demonstration was to show the first steps of the Arbalet Meki Live application

  1. The teacher launches the Arbalet Meki Live application
  2. He’s launching a server
  3. Students connect to this server by typing the IP of this server in their search bar
  4. The student enters his first name
  5. The teacher sees the student connected to his interface and can say that it is the student who has his hand on the light table.

-> Model of the teacher interface

This demonstration allows us to know which areas we need to work on next:

  1. Fix the problem of the leds
  2. Know how to communicate our application with our ESP32

Our interview with Yoan Mollard allowed us to clarify these two points.
-> Analysis of the problem on the leds, we noticed that the voltage at the beginning of the led chain was 5 V while at the end of the chain the voltage is only 3.5 V.

-> For the communication between our application and the ESP32 we will use the serial port.

**End of Sprint 1

**Behavioural problem of our leds: **
This week Yoan helped us to analyze and find the problem of our leds, he performed three tests before finding the problem.

  • We noticed that the problem was noticed when we arrived at a specific row of leds, so we changed this row but without success the problem persisted

  • We looked at whether the problem was related to the cables which were probably not strong enough to maintain a voltage of 5 v between led 1 and led 150, but after some tests, the problem remained the same.

  • We tested the leds with the arduino to see if the problem came from the ESP, with the arduino no more problem, so the problem was related to the ES. After some research Yoan found the problem and fixed it.
    -> Forum that allowed us to fix the problem:

Communication via serial port: **Communication via serial port: **
Concerning the communication from our application with the ESP32, we will communicate with the serial port.
To communicate with the serial port you must send the actions in binary.
The frame consists of the header, the number of pixels we will change, the number of the pixel we will change, and its color in RGB.

**Blockly integration: **

In this project we had to switch from the Snap! graphic language to the Blockly graphic language and therefore recreate some blocks to be able to light LEDs.
Once all the blocks were completed we integrated them into our project and we were matched with our graphic charter.

Simulation screen
When students are looking to create a program, they have a light table simulation screen at their disposal, it allows them to visualize their program, see if it works as they want and once they are satisfied with their code, they can ask the teacher to have their hand on the table and thus visualize their program on the Lava Crossbow table.

By adding the right blocks you can make a tricolor flag for example.

Monday’s demonstration: **Monday’s demonstration: **

  • We open the application Arbalet Meki Live

  • We launch the server

  • The student connects to this server by typing the IP of this server in their search bar

  • The student enters his first name

  • The teacher sees the student connected on his interface

  • The student will carry out his first program, for example, making a tricolour flag

If we can integrate the new library on our ESP32 we may be able to light a led with a javascript command and show it during the demonstration.

Start of the sprint 2
Last week we made very good progress on the application, since we made the different blocks we need to easily and graphically program a light table. We can execute our code to simulate the animation directly in our web browser. However, we have improvements to make, having an interface in French and English, preventing bugs related to infinite programs in javascript, having texts of indications of each block to guide the student.

Our great difficulties at the beginning of this project were on the light table where we had to solve the bad behaviour of some leds, after having identified the problem we solved it by installing a new library that is understood by our leds and that turns them on and manages without causing unwanted flickering.
We must therefore adapt our code so that it is compatible with this new library.
To change the color of a led you can use two methods, RGB (Red Green Blue) and HSV (Hue, Saturation, Lightness ).

How to create a color according to the different parameters you enter for the HSV and RGB method.

In this example the colors are determined according to a percentage of a parameter for example 100% of Red or 100% of saturation and 50% of light to have red.
We will speak directly in binary with bytes so 100% will be equal to 255 and 50% to 128.

This week we must succeed in bridging the gap between our blockly interface and the arduino table to do this we will need node.js and the serial port.

Monday demonstration:
Today we demonstrated the blockly interface, our teachers were able to make their first programs and visualize them on the web interface simulator.

End of Sprint 2
Hardware problems
After installing a new library on our ESP32, we no longer had any flicker problems, so we were able to make our first programs in javascript and run them on the table via the serial port. After several tests we realized that the performance was not at all good, we couldn’t light more than 46 LEDs and we couldn’t increase the lighting speed of one LED.
So we understood that we had a problem with memory saturation, so we tried to optimize the frames.
Once the frames were optimized, only 4 light ribbons worked, but the problem was not with the code. So we inspected our table and found that a wire was unsoldered… Head for the fablab and here we are with a functional table.

Part Software
Blockly :
It is now possible to export and import programs to be executed.
The interest of this functionality is always for educational purposes, even if blockly is a graphic language and therefore easier to assimilate than a standard language. Making your first program in front of a blank sheet of paper remains very complicated. With this feature, students will be able to import examples of programs already provided by the application, created by their teacher or by the community, so they can analyze a functional code and reproduce it.

The IONIC application :
A mobile application had been created for the installation of the light wall at the Saint Jean station, in the application there was a controller to control the wall and interact with it.
This week we have enriched this application to add the configuration menu of the Arbalet Lava table.

Monday, March 4 demonstration :

  • On the Blockly interface we import a code

  • We execute it in the viewer of our web browser

  • It is executed on the table