loader

Activity No. 0: Getting started with the board (Starter kit Vittascience)

Discovery of the NUCLEO-L476 board and the Vittascience programming interface.

The NUCLEO-L476RG board is a programmable card developed by the Franco-Italian company STMicroelectronics.

The internal memory of the NUCLEO-L476RG can accommodate a computer program (suite of instructions to be carried out) designed by the user. 
Composed of an STM32 electronic chip (known as a microcontroller), this card will be programmed using a computer.

The card is made up of different parts, here are the most important in the diagram below: 
L476 parts

The STM32 microcontroller is the main element of the card, it contains the user's program in its memory.

The USB port allows the card to be connected to the computer via the USB cable. This allows the card to be supplied with electrical energy, as well as the transfer of program data to the card. 

The B1 button is used to interact with the board. An action can be performed when the following instruction "if button B1 is pressed, then...." is used.
The Reset button is used to relaunch the program in the card memory. 

The LEDs (No. 1, 2 and 3) are indicators for the user. LED n°1 indicates the power supply of the card. It flashes when copying a program. It cannot be programmed.
LEDs n°2 and n°3 can be programmed by the user: to be on, off or flashing. 

The connectors (in Arduino Uno format) allow you to attach extension modules, this is particularly the case for the module named Base Shield Grove provided in the Starter Kit. 
L476+shield-FR


Other elements make up this NUCLEO-L476RG board, but they are not necessary for the discovery of programming with the Starter Kit.
To find out more: https://www.st.com/en/evaluation-tools/nucleo-l476rg.html

To program the NUCLEO-L476RG board, you must use the Vittascience interface, available at the following address: https://en.vittascience.com/l476


interface-l476-en

This free interface, available without installation from an internet browser, allows you to program the board. It consists of different parts.  
L476 website

In the center, the work area allows the creation of the program. It accommodates the different blocks placed by the user to build the program.

The block compartment, located on the left, contains all the instructions for creating a program. For example: switching on the LED… 
The zone located on the right corresponds to the created program which is displayed in the form of a text: we are talking about code. The language used is specific for each microcontroller, here it is Python.  

The console, at the bottom of the interface, allows the user to interact directly with the card connected to the computer. This area displays messages from the card, and the user can also send them.  

The image below is interactive, you can click on the different elements to discover the Vittascience interface. 



The "On Start" and "Forever" blocks are the key elements of how the board works. They are present from the opening of the Vittascience interface.  

The instructions placed in the "On Start" block will be executed as soon as the card is powered up. While the program instructions placed in the "Forever" block, will be executed after start-up and then continuously until the board is no longer supplied with electricity. 

Now let's move on to creating a first program! 

We are going to create a a first program: turn on LED n°2.
You must use blocks of instructions to build the program. Each block corresponds to an action that the card will perform when the program is about to be launched.

For this first program, you must use the "control the LED..." block located in the Display of the blocks locker.

inventory-display-en

This block must be dragged and dropped on the work area and placed in the "Forever" block already present.

A simulator is integrated into the programming interface, it allows you to view the program created without copying it to the card. 

To access the simulator, you have to click on the button below:

sim-en
Below is the simulator with a program. The created program causes the LED to flash every second. 

Before copying a program for the first time on the card, using the Vittascience interface, you must install the firmware in micropython on the board. 
In a simplified way, we will proceed with the installation of the software on the card which will then make it possible to execute the program created by the user. We use the term flashing.

Here are the steps to flash the card: 
1. Connect the cable to the card's USB port,
2. Connect the cable to the computer,
3. Click on the Download .bin button on the Vittascience interface. It is accessible on the side arrow, next to the Download button.

upload-en
4. From your computer's file explorer (under Windows => My Computer / under MacOs => Finder), drag and drop the firmware_micropython1.19.bin file
firmware-FR


5. Wait for the flashing to complete. LED #1 changes from red to green.
6. Unplug the card from the computer, then plug it back in.

Your card is now ready to be used with Vittascience! 

To copy the program designed on the Vittascience interface to the card, proceed as follows: 

1. Connect the USB cable to the port on the card
2. Connect the cable to the computer
3 Click on the Upload button

televerser-en

4. Wait for the program to finish copying. You can follow the progress in the console at the bottom of the interface.

You succeeded ? Perfect, you now know how to program your NUCLEO-L476RG card! 
Discover the other activities of the Starter kit by clicking on the icons below.

رخصة الاستخدام