XXL Kit for Arduino · FlashESP.com

Part 2 First steps on FlashESP.com

  • Beginner
  • Ages 8+
  • about 30 min

Before you start connecting the parts of the kit, get to know the place where you will write your code and flash it to the board: the FlashESP.com platform. In this part you will create an account, activate the course with the code from the sticker and see what a lesson page looks like: with the code editor, building the program, flashing it to the board and the Serial Monitor, where the board “talks” to you in text.

Who is it for? For children and teenagers aged 8 and up, for teachers, and for adults who are just creating an account and want to get to know the platform before they move on to their first circuit.

01

Your FlashESP account

The code you write is saved to your account, so that is where you start.

Go to FlashESP.com and click “Sign up”. The form asks for four things: a username, an email address, a password and the same password once more. After you send the form, an email with a link arrives at that address. Click the link to confirm your address. Only then can you sign in to your account, with your username or your email address.

If you do not have an email address of your own yet, ask a parent or a teacher to help.

You do not need an account just to read the tutorial. You need one to write and flash programs and to keep your progress: without an account, only the browser you are reading in remembers your progress.

02

The FlashESP dashboard

After you sign in, you land on the dashboard. Everything you need is in the side menu.

On a computer the menu is on the left. The arrow next to the FlashESP logo folds it down to just its icons. On a phone you open it with the button with three lines in the top right corner.

Menu itemWhat you find there
My Projectsyour projects, including the ones FlashESP creates for the parts of the course (more about that in a moment)
Exploreprojects that other users have shared publicly: a good source of ideas
My Favoritesprojects you mark as favorites
Tutorialsstep-by-step courses, this one included, with the list of parts and your progress
Serial Monitora view of the text the board sends over the USB cable; it opens below the page you are looking at

At the bottom of the menu are Docs (how the platform works), Changelog (what is new in FlashESP), the name of your account with its email address and the Logout button.

03

Activating the course

Anyone can read the tutorial. To write and flash programs next to the lessons, you need the code from the book.

The book that comes with the kit has a sticker with a code. You enter it only once, and it unlocks the whole course: every part, from the first to the last.

  1. 1Sign in to your account.
  2. 2Go to flashesp.com/activate, or open Tutorials in the dashboard, choose this course and click “I have a code from the book”.
  3. 3Copy the code from the sticker into the field “Code from the sticker” and click “Activate”.
  4. 4Done: you will see “All set!” and a button that takes you straight to the course.

The code has 12 characters. You do not have to type the dashes, and capital or small letters do not matter. It has no letters O, I or L and no digits 0 or 1, so they cannot get mixed up.

04

The lesson page: Read and Code

Each part of the course is one page. You can read it like a book or write code right next to it.

From the header of a lesson page you can open the contents of the whole course and go to any part, and at the end of a lesson there are links to the previous and the next one. If you are signed in, you can also get back to your projects and the rest of the FlashESP dashboard from the lesson page at any time.

In the parts where you write a program (from Part 3 on), the header has a switch between two modes:

  • Read: the lesson on its own, like in a book. On a wide screen you see the list of its sections next to it. Next to the lesson's program there is a “Start coding” button, which switches you to Code mode.
  • Code: the lesson on the left, your code on the right. You can move the border between them to make one side or the other bigger. On a narrower screen, such as a phone, you switch between them with the “Tutorial” and “Editor” buttons.

At the end of each part there is a checklist to tick off and a “Mark as completed” button. You then see the completed parts in the list of parts of the course.

05

The code editor

You write the code in the browser, without installing anything on your computer.

The first time you open Code mode in a part, FlashESP creates your own project for it and puts the starter code into the editor: usually the skeleton of the program, with comments that hint at what to add. You will also find this project in “My Projects” later.

You do not have to save anything yourself: the editor saves the code on its own, a moment after you stop typing. Above the editor you see “Saving...” or “Saved”. Your code waits for you on your next visit, even on another computer, as long as you sign in to the same account.

In Code mode, the finished program in the lesson is hidden under “Try it yourself first”. Try to write it yourself, and if you get stuck, click “Show the code”.

If the program uses a library, ready-made code written by somebody else (for example to work with a card reader), it has already been added to the project of that part. You do not have to look for it or install it.

06

Building the program

Before the board can run your program, it has to be built: translated from the language you understand into the language the microcontroller understands.

Above the editor there are two buttons: Check code and Build & flash. “Check code” only builds the program. It does not need the board, so you can check your code this way on a phone too, or before you plug in the cable.

The building happens on the FlashESP servers. Below the editor, in the “Building & flashing” tab, you see the steps one after another: Save, Build, Flash. When everything goes well, a green message appears, “The code is correct and ready to flash.”, together with how much of the board's memory the program takes up.

It will not always work the first time, and that is completely normal. If there is a mistake in the code, you see a list of errors with line numbers, and for the most common ones FlashESP explains in plain words what is wrong: for example that a semicolon is missing or that the curly braces do not pair up. Click an error and the editor takes you to that line. The full, technical record of the compiler opens under “Full compiler log”. It helps when the short explanation is not enough.

07

Flashing the board

The built program still has to travel over the USB cable to the board. FlashESP does it straight from the browser.

To flash, you need a computer with Google Chrome or Microsoft Edge: only these browsers can talk to the board over the USB cable. On a phone, a tablet and in other browsers the “Build & flash” button is turned off, but you can read the lesson, write code and use “Check code” anywhere.

  1. 1Connect the R3 board to the computer with the USB cable from the kit. The power light on the board comes on.
  2. 2Click Build & flash.
  3. 3The first time you flash, the browser shows a small window with a list of ports. Choose your board and click “Connect”. The R3 board from the kit usually has “USB Serial” or “CH340” in its name.
  4. 4FlashESP saves the code, builds it and flashes it to the board, and a progress bar shows what is happening. Do not unplug the cable meanwhile.
  5. 5When you see the green message “Done. Your program is running on the board.”, the program is already running.

If something goes wrong, FlashESP says below the editor what happened and suggests what to check. We go through it carefully in Part 4, with your first circuit.

08

The Serial Monitor

The board can “talk” to you: it can send text over the same USB cable. You read it in the Serial Monitor.

A program sends text with the commands Serial.print() and Serial.println(). You will meet them in Part 3. To see the text, open the Serial Monitor tab below the editor:

  1. 1Check the speed: it has to be the same as in Serial.begin() in the program. In this course it is almost always 9600 baud, and that is what the monitor is set to at the start.
  2. 2Click Connect. If the browser asks for a port, choose the board the same way as when flashing.
  3. 3Everything the program prints appears in the window, line by line.

You do not have to disconnect anything before flashing: the monitor pauses on its own while the board is flashed, and afterwards it connects again and shows the new program starting up. The button with a circular arrow (“Restart board”) starts the program from the beginning, like the reset button on the board. In the monitor you can also send text to the board: type it into the field “Type a message for the board” and click “Send”.

If you see gibberish instead of text, the speed in the monitor is different from the one in Serial.begin(). If the board does not connect, click “Can't connect?” in the monitor, and FlashESP suggests what to check.

The Serial Monitor is in the FlashESP dashboard too: in the side menu, under “Serial Monitor”.

09

The solution and the comparison

Stuck? Every part has a finished solution, and you can see how it differs from your code.

Above the editor there are two tabs: My code and Compare. In “Compare” you see your code and the solution from the tutorial side by side, and the differences are marked in color: red for what only your code has, green for what the solution has. There are also three buttons:

  • Flash the solution: flashes the finished program from the tutorial to the board, while your code in the editor stays as it is. This way you can check whether you built the circuit correctly: if the solution works and your program does not, the mistake is in the code.
  • Insert the solution: replaces your code in the editor with the solution. FlashESP asks first whether you are sure.
  • Start over: brings back the starter code of this part, also after asking.

Build checklist

Tick them off one by one. Your progress is saved in this browser.

0 / 7

First steps checklist

Rules worth remembering

  1. 1

    You flash from a computer, in Chrome or Edge.

    On a phone or a tablet you can read the lesson and write and check code, but you cannot program the board.

  2. 2

    The compiler log is not the Serial Monitor.

    You see build errors in the “Building & flashing” tab, and the text from a running board in the “Serial Monitor” tab.

  3. 3

    The same speed here and there.

    The speed in the Serial Monitor has to be the same as in Serial.begin(). Otherwise you see nothing, or gibberish.

Projects

  1. 1

    Create an account, confirm your email address and sign in

    Easy
    What you will use
    a computer or a phone and an email address
    What you will learn
    the whole path: sign-up → confirming the email → signing in
  2. 2

    Activate the course with the code from the sticker

    Easy
    What you will use
    the code from the sticker in the book that comes with the kit
    What you will learn
    unlocking writing and flashing programs next to the lessons
  3. 3

    Open Part 3 in Code mode and click “Check code”

    Easy
    What you will use
    a computer, a tablet or a phone: no board needed
    What you will learn
    building a program without the board and reading the result
  4. 4

    Delete one curly brace on purpose and check the code again

    Medium
    What you will use
    the editor of Part 3 and the “Check code” button
    What you will learn
    reading errors and jumping to the line with the error

Summary

FlashESP.com is the place where, from now on, you will write the code of this series and flash it to the board. Your account, the code from the sticker, the lesson page with its Read and Code modes, the “Check code” and “Build & flash” buttons and the Serial Monitor: you will come back to these in almost every part that follows. In Part 3 you will write your first programs and see in the Serial Monitor what the board has to tell you.