Jump to content
Electronics-Lab.com Community


  • Content Count

  • Joined

  • Last visited

1 Follower


  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. RTC helps to reveal the real time to the machine thus it's critical to some applications. Using MicroPython on Ameba RTL8722, we can get RTC time in just 2 lines, here is how, Materials Ameba x 1 Steps RTC module help microcontroller to keep track of time and is essential to our time module. Here we an example to demonstrate how to get local time and update the time. Copy and paste the following code line by line into REPL to see its effect. rtc = RTC() rtc.datetime() # get date and time
  2. PWM is one of the crucial peripheral of an MCU, with MicroPython, you can control RTL8722DM to output PWM signal to fade and brighten an LED with ease, here is how, Materials Ameba x 1, LED x 1, Resistor(220ohm) x 1 Steps PWM use pulse width modulation to control output duty cycle and is widely used to control LED brightness and motor. Here we are using an LED to demonstrate how PWM works. Let us connect pin PA_26 to the anode leg of an LED which in series with a current limiting resistor and GND to cathode of the LED as shown below, Then,
  3. Today is the Chinese Lantern Festival, which is a big festival in Chinese speaking community and also it marks the end of the month-long Chinese New Year celebration, let's see a short clip of Ameba driving e-ink display and playing music https://youtu.be/0uOHViIgqj8
  4. Sometimes we need to exchange some data with another microconrtoller in close range, then we can use I2C for this job, even better, with MicroPython, we can do it in less than 5 lines of code, here is how it's done on ameba RTL8722 from Realtek, Materials Ameba x 1, Arduino UNO x 1 Steps I2C is a very common module on microcontrollers, it only takes 2 wire and able to achieve data rate at up t
  5. Controlling LED has never been easier with MicroPython on Ameba RTL8722 WiFi and BLE microcontroller, today I am gonna show you just how to blink an LED in 3 different ways! Materials Ameba x 1, LED x 1, Resistor(220ohm) x 1 Steps Blink is one of the best examples to get started with MicroPython. Let us connect pin PB_22 to the anode leg of an LED which in series with a current limiting resistor and GND to cathode of the LED as shown below, Then, copy the following code and press Ctrl + e in REPL to enter the paste mode (for more informatio
  6. Introduction Arduino IDE is a convenient tool to write your code and upload to microcontrollers. However, it doesn’t come with debugger function, which means the only way to debug our program is through using debug message through standard output, in this case, Serial Monitor. Debug message is handy and it helps to print out the information the registers holds at a specific time, but once you have done debugging and your program is ready to go, we often have to delete/comment out those debug message code manually, in a big project, this could be problematic as there are just too manny
  7. With a BLE5.0 & Dual-band WiFi microcontroller, you will never have to worry about re-compiling the code just to change the WiFi ssid and password. Ameba RTL8722 is a BLE5.0 and dual-band WiFi (2.4G & 5G) Iinternet-of-Things (IoT) developing platform that suit the need for many IoT application scenarios. Taking advantge of its BLE + WiFi combination, we can easily change Ameba's WiFi setting and save us great deal of time. Take a look at the short video below to learn more https://youtu.be/TA4A-VXbImo
  8. RTL8722 from Realtek supports MicroPython and reading ADC values using Python script in 3 lines, here is an example ADC read potentiometer: • Materials: Ameba x 1, potentiomete x 1 • Steps: Here we connect ameba to a potentiometer to measure its analogue value, the connection is as follows. Copy and paste the following code into REPL. from machine import ADC a = ADC(0) a.read()
  9. What if you wanna measure something yet you don't have a handy tool, worry not, we can build a super handy measuring tool that can measure up to 4 meters in 10 mins! Follow the vidoe tutorial below and start making your own futuristic ruler in 10 mins! Ruler 2077 Tutorial Video
  10. Microcontrollers are known for its low power usage and limited resources thus often deemed unable to understand Python script as Python need interpretor to translate script into machine langauge and intepretor are usaully quite resource-consuming. However, MicroPython has arisen as a lean and efficiant Python 3 interpretor that can be run on ARM Cortex-M series microcontrollers. Ameba RTL8722 is an ARM Cortex-M33 microcontroller that has dual-band WiFi and BLE 5.0, other than that it is fully capable of running MicroPython and controls WiFi using Python script. In addition, its req
  11. BLE – Battery Client Nowadays a lot of DIY project use rechargable battery to make the product mobile and portable, but monitor the battery level can be quite troublesome, with RTL8722DM BLE and WiFi microcontroller from Realtek, we can retrieve battery information through BLE easily, here is how, Materials AmebaD [RTL8722 CSM/DM] x 2 Example Introduction BLE connections use a server client model. The server contains the data of interest, while the client connects to the server to read the data. Commonly, a Bluetooth peri
  12. Transmit IR NEC Raw Data and Decode Materials Ameba x2 (one for IR transmitting, the other one for IR receiving) Grove – Infrared Emitter x1 (Figure 1) Grove – Infrared Receiver x1 (Figure 2) Example In this example, we use two Ameba RTL8722 modules that connecting with an infrared (IR) Emitter and an IR Receiver separately to transmit and receive IR NEC Raw data. Figure 1: Grove – Infrared Receiver Figure 2: Grove – Infrared Emitter On the transmission side, the transmit
  13. This is MicroPython project developed using Ameba RTL8722. MicroPython is offically supported on Ameba RTL8722, so through this demo video, we will see how easy and fast it is to develop a simple server socket on Ameba, which would then control other peripheral to perform other tasks. Here we are using a client socket code running on PC to send a 'Hello, world' string via the WiFi network, Ameba receives it and if it is indeed 'Hello, world' then it will blink the LED. Check out the demo video down below, https://youtu.be/pEMkwvw-r18 Code used: #!/usr/bin/e
  14. Python has become the most popular language in the past few years, and now we can even program Microcontrollers with Python language through a project named MicroPython. MicroPython is, by its definition, a efficient and lean python compiler and runtime that is designed for Microcontroller. It supports Python 3 syntax and can be run interactively using its command prompt--REPL. Now, MicroPython has even been ported to Ameba RTL8722 dual-band WiFi and BLE 5.0 microntroller, here is a demo of how it works, Demo Video
  15. Bluetooth Low Energy is energy conversing wireless procotol that help IoT microcontroller to save a great deal of power as compared to using WiFi. Here we use Realtek's RTL8722 dual-band WiFi and BLE 5.0 IoT microcontroller to demo how to output PWM signal to a RGB led over BLE UART Materials Ameba D [RTL8722 CSM/DM] x 1 RGB LED Android / iOS smartphone Example Introduction In this example, a smartphone app is used to transmit commands over BLE UART to control the PWM outputs and change the color of a RGB LED. Refer to the other example guides fo
  • Create New...