• 16
      Jun - 2018

      MicroPython | 2 min | 2705

      #MicroPython: Camera stabilisation application

      MicroPython | 2 min | 2705


      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 | 8890

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

      MicroPython | 4 min | 8890


      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 | 3334

      #Tutorial: Installing dependencies on MicroPython

      MicroPython | 1 min | 3334


      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 | 1481

      #Micropython: Merry Xmas & Happy New Year!

      MicroPython | 4 min | 1481


      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...

    • 12
      Nov - 2017

      Hacking, MicroPython, Security | 5 min | 5674

      #Hacking: Wemos (ESP32) & Captive Portal using MicroPython

      Hacking, MicroPython, Security | 5 min | 5674


      captive portal system
      dns
      esp32
      hacking
      micropython

      At the beginning of October I wrote a blog article called White Hacking: WeMos and SquirelCrawl!. I used the WeMos (ESP32) and the firmware provided by Hacker Arsenal to do a captive portal. As you known, a captive portal is a web page which is displayed to newly connected users before they are granted broader access to network resources [wiki]. This can be used in combination with evil portals to obtain login credentials. The firmware provided by Hacker Arsenal has multiple limitations, e.g. the web page has to be a single file, without external files, meaning that all images should be integr...

    • 01
      Nov - 2017

      MicroPython | 5 min | 2421

      #MicroPython & #WiPy 2.0/3.0: Geolocation using WLAN

      MicroPython | 5 min | 2421


      esp32
      geolocation
      google apis
      micropython
      wifi
      wipy

      I was surfing the services that Google offers, I found the Geolocation API. As Google describes the API: it returns a location and accuracy radius based on information about cell towers and WiFi nodes that the mobile client can detect. As I was writing the last post using MicroPython, I thought the WiPy 2.0/3.0 could be a nice "mobile client".

      To use the API you need to get an API key from Google. As a standard user of the API, you get:

      • 2,500 free requests per day, and
      • 50 requests per second, per user.

      I thought I could play with it to test the accuracy of the geolocation.

      Python Code: ...
    • 29
      Oct - 2017

      Home Automation, MicroPython | 7 min | 6613

      #MicroPython: WeMos (ESP32) and Amazon Echo (Alexa) - Switching LED Colors!

      Home Automation, MicroPython | 7 min | 6613


      amazon echo
      belkin
      esp32
      home automation
      micropython
      wemos
      ws2812b leds

      I don’t have any Belkin WeMo system or Philips Hue light bulbs. However, I have two ESP32 running MicroPython (see my last article), and a W2812b LED strip, and I thought I should be able to say, "Echo/Alexa, turn on the kitchen light" or "Echo/Alexa, turn on the blue light" and It should work with this setup.

      And... it works as you can see in this video!

      If you are interesting in only using the code, then click here. Otherwise, you can read the complete story... ;)

      Python Code: https://github.com/lemariva/uPyEcho

      If you’re not up to speed with MicroPython, Wipy see earlier articles in...

    • 28
      Oct - 2017

      MicroPython | 5 min | 15352

      #Tutorial: Getting started with MicroPython

      MicroPython | 5 min | 15352


      atom.io
      esp32
      micropython
      tutorial
      visual studio code
      wemos
      wipy

      Another quick tutorial, this time for MicroPython on ESP32/ESP8266. You can find all the information that I'm writing in this post in different articles on the Internet but I've not found anything that summarizes all the topics. That is why I am writting this article. I included some links at the end of each topic to extend the info. Feel free to visit them, if you want more information, or write a comment I will try to reply it ASAP!

      Python Code: https://github.com/lemariva/ESP32-MicroPython

      MicroPython & Board

      What's MicroPython?

      Quoting the official micropython page results in the fol...

    • 15
      Jun - 2017

      MicroPython | 1 min | 2936

      #MicroPython: Vu meter using WS2812B and SPW2430

      MicroPython | 1 min | 2936


      esp32
      micropython
      SPW2430
      wipy
      ws2812b

      Hi everyone!

      As soon as I saw the WS2812B led strip, I thought: doing a vu-meter with these LEDs would be a nice thing!.

      I was looking for economical MEMS microphones with board (I didn't want to solder a board). I found two options: SPH0645LM4H and SPW2430.

      The SPH0645LM4H uses an I2S interface and the SPW2430 has an analog output. The second board (SPW2430) has two outputs: AC pin which has a capacitor in series to eliminate the DC output of the IC, and the output of the IC (DC pin).

      Preview

      Hardware

      I bought the MEMS mics from exp-tech, here some links (from adapfruit too):

      WIPY2.0WiPy 2.0 x...
    • 02
      Apr - 2017

      MicroPython | 1 min | 3873

      #MicroPython: Weather Report using NEO-M8N

      MicroPython | 1 min | 3873


      esp32
      gps
      micropython
      report
      st7735
      weather
      wipy

      Hi!

      I had two busy months, I've been writting my PhD-Thesis, and another publication and yeap... sorry! I forgot to update the blog!

      Python Code: https://goo.gl/v7NCkj

      Three weeks ago, I received a Ublox NEO-M8N GPS and I tested it with the code that I had. I said it should work, but as you know it always needs some modifications! The NEO-M8N supports GLONASS and GPS, so the $GP changes to $GN, e.g. $GPGGA (GPS) > $GNGGA (GPS+GLONASS).

      The following changes were added:

      # lines 604-606:
      if self.gps_segments[0][2:] in self.supported_sentences:
          # parse the Sentence Based on the message...