Ameba Arduino: [RTL8195AM] Ameba Video Camera


  • Ameba x 1
  • L298N H-Bridge x 1
  • 4-wheel motorcar or 2-wheel motorcar+Universal wheel x 1
  • Android Phone x 1
  • Logitech C170 web cam x 1
  • Mirco USB OTG adapter x 1
  • 18650 Li-ion battery >= 2
  • 18650 batter holder x 1


  • Power source

In previous examples, we use portable power bank as power source and use Ameba to supply power for L298N Bridge and the motor. However, in this example we connect a webcam additionally. To provide sufficient power, we use two 18650 batteries as power source. A typical 18650 battery is 3.7V. For safety concern, please keep the battery in cool temperature, and use stable voltage to charge the battery.
We connect the two batteries in series to provide 7.4V voltage. L298N Bridge accepts 7V to 12V power. We connect the batteries to L298N. There is a 5V power output on L298N, we can use it as the power supply for other components.

  • Wiring

The detailed wiring diagram:

  • Download AmebaMotors library and run the example

Please download AmebaMotors library version 1.0.3:
And install the library to Ameba:

Note that if you have installed AmebaMotors v1.0.1, please remove it before installing v1.0.3. Find the location of the library in “File” -> “Preferences”, the “Sketchbook location” is where Arduino IDE stores sketches and libraries. For example, in the figure below, the Sketchbook location is “D:\workspace\arduino”, then the AmebaMotors library is located in “D:\workspace\arduino\libraries\AmebaMotors”. Please remove old version first, then install version 1.0.3.

Open the example in “File” -> “Examples” -> “AmebaMotors” -> “car2wd_mobile_plus_uvc”,
then follow the steps:
1. Upload: Upload the sample code to Ameba
2. Wiring: Connect the components as the wiring diagram in previous section.
3. Download App: you can download and install it directly here: Car Remote 2.0

4. Connect android phone to Ameba: Go to “Settings” -> “Wi-Fi”, find the SSID “mycar”, enter password “12345678” and confirm that the android phone is connected to “mycar”.

Below is the demo video of this example:

Code Reference
Please confirm that QQ communication software is installed