🎨
MadMachine-Examples
  • Introduction
  • About our project
  • Getting Started
  • Tutorial
    • What is SwiftIO
    • How to use IDE
    • Libraries
    • MM SDK
  • Built-In Examples
    • GettingStarted
      • Blink
      • ReadDigitalInput
      • ReadAnalogInput
      • PWMBrightnessControl
    • SimpleIO
      • ButtoncontrolLED
      • BlinkAnalogIn
      • BlinkTimer
      • BrightnessAnalogIn
      • Debounce
      • LEDsBrightnessControl
      • PWMSoundOutput
      • PWMMelody
    • AdvancedIO
      • ILI9341
      • LCD1602
      • MidiPlayer
      • PCA9685
      • SHT3x
      • SSD1315
    • Challenge
      • LCDFamily
      • RobotArm
      • Tetris
    • MakerKit
      • Mission 01 Blink
      • Mission 02 RGB LED
      • Mission 03 Push Button
      • Mission 04 Potentiometer RGB
      • Mission 05 Buzzer
      • Mission 06 Seven Segment Display
      • Mission 07 DC Motor
      • Mission 08 Servo Motor
      • Mission 09 LCD
      • Mission 10 Humiture Sensor
  • Library Reference
  • FAQ
Powered by GitBook
On this page
  • Step 1: Download and install the MadMachine IDE
  • Step 2: Coding in the IDE
  • Step 3: Prepare SD card and confirm USB connection
  • Step 4: Build your code and download it to the board

Was this helpful?

Getting Started

PreviousAbout our projectNextTutorial

Last updated 4 years ago

Was this helpful?

Get your SwiftIO board? 🤣 Follow us step-by-step to realize your first project.

Step 1: Download and install the MadMachine IDE

The MadMachine IDE provides you with an easy way to code. It is available on Windows and Mac now.

So first of all, you need to download and install the MadMachine IDE to program your SwiftIO board. You'll find the latest software package .

Select the appropriate version according to your operating system.

If you meet with any problem, please refer to .

When you first open up the MadMachine IDE, it appears like this:

Step 2: Coding in the IDE

It's time to start your first project in the IDE 🥳 .

First of all, create a new project.

We called Blink. Just try to choose a descriptive name as you like.

Then click Create.

Some read-only sample codes are offered in the IDE. You can copy them into the project and see what's going on.

Here is a simple example for your reference:

import SwiftIO

let green = DigitalOut(Id.GREEN)
​
while true {
    green.write(true)
    sleep(ms: 1000)
    green.write(false)
    sleep(ms: 1000)
}

Step 3: Prepare SD card and confirm USB connection

Make sure that you have inserted a SD card into the slot.

Connect your SwiftIO board to your computer through the Download port using a Micro-USB cable.

Press the DOWNLOAD button, SwiftIO will mount the SD card as a USB Flash Drive on your computer.

Note: Bad quality USB cable or some third-party USB hub may cause connection failure.

The onboard RGB LED will show you the current status of the USB connection:

RED

GREEN

BLUE

On

USB communication failed

USB connection established

-

Slow flashing

Verify file(swiftio.bin) failed

-

-

Fast flashing

Open file(swiftio.bin) failed

Detecting USB connection

Detecting SD card

Step 4: Build your code and download it to the board

Once the SD card has been mounted successfully, an icon will appear in the status bar of the IDE.

Click the Download button.

The IDE begins to build your project and then download it to the board if there is no error.

Wait a few seconds, you will see the USB flash drive is removed automatically.

And then, the onboard LED will blink✨ .

You can also watch this tutorial to get more info.

video
here
FAQ