iot4i first release!

led-strip

Last week I told you about my new project, the scotchshelf, a rgb wooden shelf.

I worked on the digital part of the project, and the iot4i project is born!

You can find two projects in the iot4i group on gitlab:

The first milestone had only one business feature : we wanted to set the current color from a web browser, and see that the led strip bright with this color.

One issue was open on both projects : see https://gitlab.com/iot4i/controlcenter/issues/1 and https://gitlab.com/iot4i/firmware/issues/1

Control center

As I said earlier, I wanted to learn to use Eclipse Vert.x as reactive application server. So the iot4i/controlcenter is a Scala Eclipse Vert.x application, with a frontend in Angular 4.

You can see the code of the release on https://gitlab.com/iot4i/controlcenter/tree/0.1.0

What is good so far

  • Eclipse Vert.x is really nice to use, but I need more features to implement before I can have a real opinion on it. I like the toolkit side of the library, where it is really un-opinionated, and you can do what you want, as you want.
  • Docker/Gitlab/Gitlab-ci: even if i work alone on the project, it’s nice to use gitlab flow for issues, merge requests and continuous tests/integration. Docker is extremely great for building and deploying the application.
  • Angular 4 is still really cool to play with, but a little bit hard to test efficiently for beginners.

What is bad so far

  • Eclipse Vert.x test utils and documentation still lack for Scala :( If you check the Vert.x documentation page you will see that the Testing entry is the only one missing Scala, so it might be added soon.
  • Angular 4 is good, but it is a bit hard to write tests efficiently for beginners.

Device firmware

I started to use my NodeMcu ESP8266 and it’s awesome! In less than an hour, I was already receiving data from http requests, and changing the color of the WS2812 led strip.

The WS2812 led strip is controlled by a single GPIO, that send a digital signal to control the color of each led.
With AdaFruit NeoPixel makes it easy to set the color of each led and send the signal to the strip.

The circuit is really simple, I just had to power up the led strip and the esp8266, and connect the data wire from a GPIO to the data of the led:

led-off led-on

What is good so far

  • PlatformIO Core that bring board support, configuration, library fetching, compilation and firmware upload via serial is really efficient and easy to use.
    I was really surprised by the Library Manager from PlatformIO, where you can describe your dependencies targeting either a standard platformio library or, more like in Go, a git repository with a specific tag, branch or commit.
  • PlatformIO IDE is an IDE based on Atom makes it really easy to write your first program for your micro-controller. It fully integrate the PlatformIO core, and use auto-completion from clang.
  • The Arduino libraries bring useful functions for GPIO usage and board specific features.
  • This is so cool to create and upload your first program on the microcontroller!

What is bad so far

  • It is so easy to build and run your first firmware that you can do everything without understanding anything. I’m happy to know what is a serial communication, a toolchain, a compiler, etc… But even with that, I did not understood 50% of what happened under the hood. Be careful about that.
  • The electronic is a little bit sensible with few elements: the quality of the power supply, multiple power supply, or laptop power supply that do not have a ground.
  • The ESP8266 may have some incompatibilities with some libraries. A great amount of arduino libs are already compatible though.

You can see the code of the release on https://gitlab.com/iot4i/firmware/tree/0.1.0

And here is the result of this first version, in my kitchen (yes the integration in the shelf has been delayed a little bit :))

comments powered by Disqus