Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
M5Stack Electronic Blueprints

You're reading from   M5Stack Electronic Blueprints A practical approach for building interactive electronic controllers and IoT devices

Arrow left icon
Product type Paperback
Published in Feb 2023
Publisher Packt
ISBN-13 9781803230306
Length 288 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Preface 1. Part 1: M5Stack Electronics Hardware Architecture
2. Chapter 1: Exploring the M5Stack Core FREE CHAPTER 3. Chapter 2: Hands-On with M5Stack Units 4. Chapter 3: Lights, Sound, and Motion with M5Stack 5. Part 2: M5Stack Electronic Interfacing Circuit Projects
6. Chapter 4: It’s a SNAP! Snap Circuits and the M5Stack Core 7. Chapter 5: Solderless Breadboarding with the M5Stack 8. Chapter 6: M5Stack and Arduino 9. Part 3: M5Stack IoT Projects
10. Chapter 7: Working with M5Stack and Bluetooth 11. Chapter 8: Working with the M5Stack and Wi-Fi 12. Index 13. Other Books You May Enjoy

Communicating with the M5Stack Core

You are now familiar with the M5Stack Core’s hardware architecture, UI design basics, and UiFlow IDE. In this section, you will learn how to set up the UiFlow IDE to communicate with the M5Stack Core. Being able to communicate with the M5Stack Core is important because the Blockly code applications you design and implement will now be tangible devices that people can use for controlling physical objects, such as LEDs, motors, and buzzers. You will be able to sense objects and environments using PIR and temperature sensors. Therefore, running software for these hardware components is dependent on communicating with the M5Stack Core device.

Requirements

To engage with this section’s learning content, you will need the M5GO IoT Starter Kit to explore the internal/external hardware electronics and software coding of your first basic application. In addition, the UiFlow code block software will be required to build and run the M5Stack Core application.

You will require the following:

  • The M5Stack Core controller
  • The M5GO IoT Starter Kit
  • UiFlow Blockly code software

Communication setup

The initial step to communicating with the M5Stack Core is to turn on the programmable device. Press the power ON button. Once the UiFlow splash screen is displayed, press the rightmost button on the M5Stack Core. The rightmost button is the M5Stack Core’s Setup function.

Figure 1.42 – Turning on the M5Stack Core

Figure 1.42 – Turning on the M5Stack Core

Then, perform the following steps:

  1. Scroll down to Switch mode.
  2. Scroll down to USB Mode. Use the middle button to select USB Mode.

These steps are shown in the following photo:

Figure 1.43 – Scroll to USB Mode

Figure 1.43 – Scroll to USB Mode

  1. Scroll down to reboot the M5Stack Core. Use the middle button to select the Reboot mode. After selecting Reboot, the USB API KEY splash screen will be displayed on the M5Stack Core unit’s LCD, as you can see in the following photo:
Figure 1.44 – Placing the M5Stack Core in USB mode (3 and 4)

Figure 1.44 – Placing the M5Stack Core in USB mode (3 and 4)

You will then insert a USB-C cable into the M5Stack Core unit. Insert the other end of the USB-C cable into the development desktop personal workstation or laptop computer. Open the UiFlow Blockly code software. The Setting screen will appear on your personal desktop workstation or laptop screen. Select the M5Stack Core icon and the proper communication (COM) port, all of which you can see in the following screenshot:

Figure 1.45 – Setting the communication port to select the M5Stack Core device

Figure 1.45 – Setting the communication port to select the M5Stack Core device

Once the M5Stack Core and communication port have been selected, click OK. The UiFlow IDE coding environment will be displayed on the screen as follows:

Figure 1.46 – UiFlow IDE

Figure 1.46 – UiFlow IDE

In the lower left-hand corner, you will see the Connected text displayed, as shown in the following screenshot:

Figure 1.47 – The M5Stack Core is connected to UiFlow Blockly code software

Figure 1.47 – The M5Stack Core is connected to UiFlow Blockly code software

You will notice the COM4 port is displayed with the Connected text, which confirms that the selection for the communication port was correct. Congratulations, your M5Stack Core is now communicating with the UiFlow IDE! In Chapter 2, you will learn how to attach and program small electronic modules such as angle and motion sensors, an RGB (red, green, and blue) LED, and an IR Remote unit to the M5Stack Core. The knowledge you have obtained in this chapter will be used to explore M5Stack Units in Chapter 2.

You have been reading a chapter from
M5Stack Electronic Blueprints
Published in: Feb 2023
Publisher: Packt
ISBN-13: 9781803230306
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime