• 27
      Dec - 2018

      MicroPython | 3 min | 16121

      #MicroPython: Visual Studio Code as IDE

      MicroPython | 3 min | 16121


      atom
      esp32
      micropython
      pymakr
      visual studio code
      wemos
      wipy 3.0

      Quoting the official MicroPython's website:

      MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments.

      Besides C++ and C, I use MicroPython to program microcontrollers, especially the ESP32/ESP8266 types. These two microcontrollers are compatible with MicroPython and it is easy to integrate sensors and actors programming using this language. I wrote a tutorial about installing MicroPython on the ESPs, as well a lot of articles a...

    • 24
      Dec - 2018

      MicroPython | 1 min | 841

      Merry XMAS and Happy 2019!

      MicroPython | 1 min | 841


      esp32
      happy new year
      jupyter
      lights
      merry Christmas
      micropython
      video
      xmas

      LeMaRiva|tech wishes you a Merry Christmas and a Happy New Year! To celebrate I made a video using the Xmas-lights from last year, but this time I connected the ESP32 to a Jupyter kernel to control the lights. A new Jupyter-ESP32 tutorial is coming soon. In the meantime, you can track Santa and spend time with your family!

      Python Code: https://github.com/lemariva/Xmas-lights

    • 27
      Oct - 2018

      Cloud Platforms, Home Automation, MicroPython | 2 min | 1573

      #Zerynth: ESP32 & Google IoT Core - Part 2: Getting data from Smart Power Outlets

      Cloud Platforms, Home Automation, MicroPython | 2 min | 1573


      esp32
      google cloud platform
      micropython
      python
      smart power outlets
      zerynth

      This part 2 of the tutorial will allow you to get data from the smart power outlets and send it to the Google Cloud Platform (GCP) throught the Google IoT Core and using an ESP32 programmed with Zerynth (Python). This data is not usually available to the user (directly, you need to use the power outlet application), and it is sent to the company servers.

      If you want to check, if your power outlets are compatible for this tutorial, they should have the port 6668 opened. To check that:

      >>> nmap <<ip-address>> -p 6668
      [...]
      Host is up (0.13s latency).
      
      PORT     STATE SERVICE
      6668/tcp open  irc
      
      ...
    • 23
      Oct - 2018

      Home Automation, MicroPython | 5 min | 7461

      #MicroPython: Controlling Smart Power Outlets using an ESP32

      Home Automation, MicroPython | 5 min | 7461


      esp32
      home automation
      micropython
      smart power outlets
      tutorial

      Today there is a wide range of offer for home automation devices. A lot of sensors, actors etc. can be connected to the cloud and be controlled using Google Home, Amazon Alexa, your smartphone, etc. There are a lot of companies offering low cost devices, e.g. Sonoff, Tuya, Teckin etc. Most of these solutions are based on ESP32 or ESP8266, and all of them send data to cloud solutions usually deployed on Amazon services, and the data is only accessible using the Android/iOS applications. They can be also controlled using voice commands over Google Home or Amazon Alexa devices.

      Nice, but... my a...

    • 07
      Oct - 2018

      MicroPython | 3 min | 18047

      #MicroPython: ESP32 sending data using LoRa

      MicroPython | 3 min | 18047


      esp32
      lora
      lorawan
      micropython
      wireless communication

      LoRa (Long Range) is a patented digital wireless data communication technology. It was developed by Cycleo of Grenoble in France and then acquired by Semtech in 2012. Semtech defines the Lora Technology "as the DNA of IoT, which connects sensors to the Cloud and enables real-time communication of data and analytics that can be utilized to enhance efficiency and productivity".

      To sum up, LoRa is a wireless data communication technology that enables very-long-range transmissions (more than 10 km in rural areas) with low power consumption. It uses license-free sub-gigahertz radio frequency bands ...

    • 17
      Sep - 2018

      Cloud Platforms, MicroPython | 7 min | 4481

      #Zerynth: ESP32 & Google IoT Core - Part 1: Sending data to the Cloud

      Cloud Platforms, MicroPython | 7 min | 4481


      bmp180
      data access
      google cloud platform
      home automation
      micropython
      python
      zerynth

      There are lot of tutorials about connecting the ESP32 to a cloud service, but I planned to connect these boards using MicroPython directly to the cloud. That means, I didn't want to use a hardware or software bridge. I wanted to use the Google IoT Core, but MicroPython doesn't support JSON Web Token (JWT), which is needed for the device authentication. I tried to write the library myself, but it didn't work, because of the needed dependencies and the small memory available on the ESP modules. But, I found Zerynth. Zerynth supports JWT and using it, it is possible to connect the ESP32 directly ...

    • 16
      Jun - 2018

      MicroPython | 2 min | 2649

      #MicroPython: Camera stabilisation application

      MicroPython | 2 min | 2649


      9g
      camera stabilization.
      imu
      micro servers
      micropython
      mpu6050
      wipy

      To continue the series of posts "connecting sensors to MicroPython", this article is about the MPU6050 (you can use also the MPU9255, I am still waiting for the Chinese sensor package) and the WiPy 3.0. Combining the IMU sensor with the WiPy and two micro servos 9g, it is possible to stabilize a camera (tilt/rotate).

      To calculate the compensation needed for the stabilisation, I added the umatrix, quaternion and ulinalg libraries to the project to make matrix multiplication and quaternion to Euler conversion. The ahrs library from Madgwick fusions the data of the accelerometer, gyroscope (and m...

    • 03
      Jun - 2018

      MicroPython | 4 min | 8448

      #Tutorial: Getting started with MicroPython: Sensors - Part 1

      MicroPython | 4 min | 8448


      esp32
      esp8266
      micropython
      proyects
      sense environment
      sensors
      wipy

      One of the most visited articles on my blog is the Getting started with MicroPython! tutorial. If you still don't know what is MicroPython and you want to start programming microcontroller boards (ESP32, ESP8266 etc.) using a small version of Python 3, you should look at that article . Don't expect to use machine learning or/and other big libraries (the available RAM and microcontroller performance is far away for that aim), but you can do some projects like these:

    • 02
      Mar - 2018

      MicroPython | 1 min | 3154

      #Tutorial: Installing dependencies on MicroPython

      MicroPython | 1 min | 3154


      esp32
      esp8266
      micropython
      micropython extensions
      tutorial
      upip
      wipy

      While I was reading my getting stated tutorial about MicroPython again, I noticed that I've forgotten to tell something about dependencies or packages.

      Here is possible to find some MicroPython packages. On the WeMos (ESP32) or the ESP8266, it is possible to install these packages using the upip package manager. The WiPy doesn't have the package.

      To download the new packages, you need to connect the board to the Internet. I take the WeMos as example and typing the following, you can connect the board to your WiFi router:

      ssid_ = <your_ssid>
      wp2_pass = <your wpa2 password>
      
      import network
      sta_...
    • 27
      Dec - 2017

      MicroPython | 4 min | 1453

      #Micropython: Merry Xmas & Happy New Year!

      MicroPython | 4 min | 1453


      esp32
      happy new year
      lights
      merry Christmas
      micropython
      video
      xmas

      It has been a while since my last post! Sorry, I was a little bit busy and then I was on a business trip in Melbourne for the CDC2017 and then I had a week holiday in Bangkok. I will be posting some photos on the next days!

      It's been a year now since I started this blog. It's a hard job to maintain it up-to-date but I still have fun writing and coding for this purpose! So let us start!


      Intro

      The first video that I published a year ago was using the Wipy2.0 and a WS2812b led strip for some Christmas lights (click here). Now, this time I bought a WS2812b panel (100 bits or 10x10 pixels -or le...