General Questions for Ameba DEV boards

Content


About Ameba Development Boards


What is Ameba Arduino?

A: It’s third-party Arduino SDK for Ameba development boards.


What is Ameba MicroPython?

A: It is an officially supported MicroPython port for Ameba development boards. Please refer to MicroPython official website for more information.


What is the main difference between Ameba Arduino and Ameba MicroPython?

A: They used different programming languages. Ameba Arduino uses C++ while Ameba MicroPython uses Python.


What are the official open-source Ameba development boards?

A: AMB21/22, AMB23, AMB01, AMB02, AMB25, AMB26, AMB82-Mini


Where can I buy the Ameba development boards?

A: You can get the Ameba development boards from https://www.amebaiot.com/en/where-to-buy-link/.


Where can I find the open-source SDK for Ameba development boards?

A: You can find the open-source SDK at ambiot (AmebaIoT) · GitHub.


Where can I find the pin diagrams for Ameba development boards?

A: Navigate to the “Getting started” page for each Ameba development boards to see the pin diagram via https://www.amebaiot.com/en/ameba-arduino-summary/.


Who should I contact if I encounter an issue while using Ameba development boards?

A: For AMB21/22, AMB23, AMB25, AMB26, BW16, AW-CU488 Thing Plus and AMB82-Mini related issues, you can ask your questions on our forum here: https://forum.amebaiot.com/. Alternatively, you can raise an issue in the corresponding GitHub repositories.

For other DEV boards, you may raise an issue in the corresponding GitHub repositories on ambiot (AmebaIoT) · GitHub.


In order to use Ameba development boards, what software do I need to download?

A: To determine which software to download, depending on the SDK and IDE you intend to use, you can visit Realtek IoT/Wi-Fi MCU Solutions and refer to the “Getting Started” page based on the Ameba development board you are using.


Can I run Ameba development boards if I am using Windows 11?

A: Yes.


What is the difference between upload and download modes?

A: They are the same, they burn the bin file into the Ameba development boards.


Hardware


Why is my board not powering up?

A: Please make sure the connector J38 beside resistor R43 is connected. The connector is used to link the power to IC.


What if I have driver issue of connecting board to your computer?

A: Please go to Drivers - FTDI for USB driver.


Software

Is the COM port number different for all boards/computers?

A: Yes.


What should I do if Ameba development boards cannot be find in the Arduino IDE “Boards Manager”?

A: Check that the json link is added to “Preferences” in Arduino IDE (find the respective json link from “Getting Started” page for each Ameba development boards at Realtek IoT/Wi-Fi MCU Solutions ).
If you are still unable to find the Ameba development board in the Arduino IDE’s “Boards Manager”, you can download the offline packages from Ameba ARDUINO – Realtek IoT/Wi-Fi MCU Solutions .


What if my code is not behaving as what I expected?

A: Try to debug your program using printf and Serial.print statements. If the issue persists, you can ask for help at Forums.


Can I use Ameba development boards without using Arduino IDE?

A: Yes.


What tools can I use to view the log console?

A: Make use of any terminal tools, such as SecureCRT/teraterm/putty etc.


What is the baud rate I have to set in Serial Monitor to prevent getting junk symbols?

A: To set the serial terminal baud rate value, it should be same as the baud rate set in the ino file. Eg, " Serial.begin(9600);"


What should I do when I am getting “failed to open COM port” error?

image

A:

  1. Check that you have correctly selected the board and COM port number on Arduino IDE.
  2. Check if it’s a hardware issue.
  3. If issue still persist, please raise the issue in the forum http://forum.amebaiot.com/.

I have this error when running Cygwin, "The program can't start because cygwin1.dll is missing from your computer. Try reinstalling the program to fix this problem.”

A: Look for cygwin folder in C drive, then look for cygwin1.dll in the bin folder and add cygwin1.dll to “C:\windows” directory.


Why is there an error “RuntimeException: Error opening serial port COM3: port busy“ in processing software?

A: At any given time, only 1 Serial Monitor can access 1 particular COM port. There are two Serial Monitors trying to open the same COM port in the above example.


Application

How to install Ameba libraries on Arduino IDE?

A: Download libraries from ambiot (AmebaIoT) · GitHub and follow the instruction at https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries to install.


Can I use other Arduino boards other than the mentioned Arduino Uno in examples?

A: Yes, however, the wiring connection will be different from using Arduino Uno. Suggest referring to the pin diagram of the board you are using.


I could not see the network port even after restarting the Arduino IDE. What should I do?

A: Same network should be used on your computer and development board.


【Basic examples】Given that the instructions are all for the Arduino boards, how do I know which pin on the Ameba development boards to connect to for all the basic examples?

A: Refer to the link for each board, Ameba ARDUINO – Realtek IoT/Wi-Fi MCU Solutions. Under “Arduino Example Guides” for each board, select “Basic Examples”. If there are any changes to the pin number or code, it will be noted in the “Remarks”/“Comments” section.


【I2C】 What if I wish to use more than 1 set of I2C pins on Ameba boards?

A: Sets of I2C pins on Ameba boards varies, you may refer to the Getting Started for each board for pin maps.

For example, there are 2 sets of I2C pins available on AMB82-MINI, which are I2C (PE3 & PE4) and I2C1 (PF1 & PF2). All Arduino examples are default using I2C (PE3 & PE4) pins. However, if you wish to use the other set (I2C1), please change object keyword from Wire to Wire1, for example Wire1.begin();.


【Network】 Does my SSID and password have to be the same as what my laptop/computer is connecting to?

A: It is suggested to connect to the same network as the laptop/computer.


【BLE】Why boards could not be found as Bluetooth device?

A: Please make sure the antenna is connected properly. Check your code for the correct Bluetooth configurations.


【BLE】After scanning, I could not find the device name in the BLE app. What should I do?

A: Make sure that your Bluetooth and Location Service are both turned on.


【Tensorflow Lite】Why I cannot get my board compiled?

A: Do remember to install the patches from https://github.com/ambiot/ambd_arduino/tree/master/Ameba_misc/ and necessary Arduino library in Arduino IDE. Installation instructions can be found in the readme file.


MicroPython SDK & examples


What are the available Ameba Development boards that can be used with MicroPython SDK?

A: AMB21/22, AMB23, BW16


How can I avoid indentation errors while copying code from examples to Tera Term?

A: Please refer to https://ttssh2.osdn.jp/ for more information.


Can I use all Python libraries available online?

A: No, MicroPython only support a small section of the classic Python standard library. However, this can be done by porting the classic python library to MicroPython.


Compilation of MicroPython firmware failed

A: During the building process, some user may encounter error that suspend the process, this is due to missing system environment setup and can be fixed as follows,

  1. Error related to python
    By default, MicroPython use python3 to run building scripts for the MicroPython kernals, if you encounter error related to python, it may be because the path of the Python3 executable is not added to system environment variable.
    However, if environment variable is already added but the build could not be completed, you may try,
  1. Re-start your PC
  2. type “python” on your terminal, if the python shown is python3, then please add
    PYTHON = python
    to the second line of the “Makefile” under “port/rtl8722” folder
  1. Error related to MPY-CROSS
    If building process stop when mpy-cross shown as error, there is a step to be done as follows,
  1. navigate to “MicroPython_RTL8722/mpy-cross” folder
  2. Open your Cygwin/Linux terminal and just type
    make
    Wait for make finish building the MicroPython Cross Compiler, then this should fix the error

Why am I constantly getting “syntax error” from REPL?

A: Please note that MicroPython only support Python 3 syntax.


How to upload my python script into Ameba?

A: There are 3 ways of uploading your python code into Ameba,

  1. via REPL normal mode
    In the normal REPL mode, you can paste your into REPL code line by line and have them executed sequentially, but note that syntax will be automatically indented when using condition checking or loop, like “if” or “while”, incorrect indenting will crash your input script
  2. via REPL paste mode
    When in normal REPL mode, press “Ctrl”+ “e” will enter paste mode, paste mode only allow pasting a large chunk of a complete code, incomplete code or editing after pasting will mess up your syntax and cause error
  3. via mp_frozenmodules
    By placing your python script into the “mp_frozenmodules” folder under “rtl8722” folder, your code will be embedded into the MicroPython firmware and uploaded to Ameba, after that you can use it by simply importing the name of your python script. If you get syntax error using this method, you better check your python code syntax again.