There is one and only Arduino :-)

I have not posted for a while but this is such a great news : after a long dispute which begun in 2015, a first “reconciliation” (Two Arduinos become one) in october 2016, it Arduino is moving forward

“BCMI, the company founded by Massimo Banzi, David Cuartielles, David Mellis and Tom Igoe, co-founders of Arduino, announces that today it has acquired 100% ownership of Arduino AG, the corporation which owns all of the Arduino trademarks.”

Read more : A new era for Arduino begins today

“Two Arduinos become one”…

Arduino community logo

I have not publish any article lately… but I just discovered the news this week a month late ! And I think it is definitely worth spreading the word.

Arduino LLC (running arduino.cc) and Arduino SRL (running arduino.org) are on the way of reconciliation ! And that is, in my opinion, a very good news,

As said in arduino.cc blog post :

At the end of 2016, the newly created “Arduino Holding” will become the single point of contact for the wholesale distribution of all current and future products, and will continue to bring tremendous innovations to the market.

In addition, Arduino will form a not-for-profit “Arduino Foundation” responsible for maintaining the open-source Arduino desktop IDE, and continuing to foster the open-source movement by providing support for a variety of scholarships, community and developer initiatives.

How did I miss this !

More here :

Upgrading Yùn from OpenWRT to Linino

[Important Edit : I just realized that the tutorial I found was not genuine Arduino web site http://adruino.cc. I stumbled upon http://arduino.org instead. So if you bought a “Genuino” Yùn, it should have OpenWRT-Yun installed, not linino. Nevertheless, you stil can install linino. But if you want to stick to “Genuino” software, keep OpenWRT-Yun. I do apologize for the mix up…]

[Edit 2 : As you may know, there is an ongoing battle Arduino (LLC) VS Arduino (SRL). All this confusion comes from here. You will find an quite interresting article on hackaday. Now I now why arduino.org Yùns are using Linino… both companies belong to the same guy.]

WARNING : I did test this on my Yùn. It may not work on yours. Be aware that you may loose your warranty. And worse, you may brick your Yùn, especially if bootloader flashing fails. You do this at your own risks. Please, don’t blame me if you brick your Yùn ! 

I bought my Yùn a while ago and did not find time to test it. In the meantime, in seems the prefered OS has changed  and now newest Yùn are fitted with Linino OS instead of “raw” OpenWRT. This caused me a bit of trouble because Arduino.cc’s Yùn getting starting guide is now assuming you have Linino installed… not OpenWRT.

I first tried a “sysupgrade” as described here [edit: this points to arduino.org, not arduino.cc]. But it failed… My Yùn was not booting any more :-(.

I should have RTFM ! It is clearly stated :

If you already have an old Arduino Yun board and you want to upgrade your board to LininoIO, you must first upgrade your on-board OS from OpenWrt-Yun to LininoOS

Ok… now what ? If it happens to you, you can follow this procedure : Reflashing the OpenWrt-Yun image on the Yún. But, as stated in the title : it reflashed OpenWRT, not Linino. And as stated in the procedure :

WARNING
Following this guide will VOID the WARRANTY of your Yún

So, again, you do it at your own risks.

Anyway… back to square 1 : I have a running Yùn using the reflashing procedure but still loaded with OpenWRT, not Linino.

So, reading the reflashing guide; it says you MUST upgrade first to Linino… points to Linino’s latest image… but does not say how to upgrade. By chance, it it quite simple : you follow the very same procedure but using the Linino images :

And it worked : I now have a Yùn running Linino.

Two last tips :

  • In the first place, I struggled entering the bootloader, typing frenetically on enter… : in the Arduino’s serial monitor, don’t forget to choose “Newline” in the dropdown list beside baud rate. It’ll also help entring the commands to reflash the Yùn
  • After upgrading to Linino, the serial console shows garbage, although baud rate is properly set top 115200. As I understand it, It is due to incorrect baud communication setting between the microprocessor and the microcontroller. To solve this, just enter  “~1” (without the quotes) in sthe serial console and you should see clear text

Hope this will help

Discovering Blynk… and making it work on DFRobot WiDo

I discovered Blynk last week.

Blynk01

Blynk

Create an app for any connected project or product based on Arduino, Raspberry Pi, ESP8266 and other hardware

 

I saw it could work with Adafruit CC3000 breakout board… and WiDo is working with this library. So lets test it !

  • Grab a WiDo
  • Add the proper libraries
  • Connect 3 leds to the WiDo on pin 11, 12 and 13 (but any other pin will do !).
  • Download this sketch
  • Rename config.h.sample into config.h and customize the values depending on your environment
  • Upload  on the WiDo (don’t forget to specify the proper board : it’s a Leonardo clone)

And that’s it !

You’ll notice the code is rather simple : almost all the magic happens in Blynk.run() whicg updates the led status when you press a button on Blynk App and a bit in Blynk.virtualWrite() which sends a value on virtual pin 1 and is used to blink a virtual led.

From WiFridge to WeIOFridge

Now that I have my WeIO, I thought I could try to “migrate” my WiFridge (which already worked on an Arduino UNO + WiFly board and an Arduino UNO + Adafruit’s CC3000 shield)

I tried to use a WiDo from DFRobots but it it based on an Arduino Leonardo and the bootloader being larger than for an Adruino Uno, I can’t get my program to fit in memory ! I’ll try a bit later to either get my code lighter or remove the bootloader and program the chip directly.

So for now, I’ll just try to leverage WeIO power to get a new version of my WiFridge : the WeIOFridge !

I had first to connect 2 DS18B20 which are going into the fridge and freezer. But there is no direct support for it so I used a workaround described here : use the UART to “simulate” 1-wire protocol. At the time of writing, a new version of WeIO software should be out in a few days which is including all necessary librairies and a little helper to simplify the use of DS18B20 on UART port.

Then, I tried to connect a DHT22 for kitchen temperature and humidity… and got some troubles. But thanks to the help of WeIO team (see posts here and here), we finally managed to get it working. As for DS18B20, update for this will be included in next WeIO software which should be out soon.

And after a bit of coding

  • in Python for the server side : reading data from the sensors, and sending them to a private emoncms web site and any connected Web client
  • in JavaScript for a nice Web UI displaying instantaneous data

I now have this :

WeIOFridge UI & Emoncms

I am now stabilizing my code (still a few glitches…) and in a next post, I’ll describe the hardware connections and associated programs.

 

WeIO and DS18B20 temp sensor (1wire)

As of today, there is not yet a library for 1-wire for WeIO but interrestingly enough, you can read 1-wire data through a standard UART.

WeIO & DS18B20 640x480

Here is what I done

  • Download tar package provided by Uros (one of the WeIO creator) here : http://we-io.net/downloads/ds18B20.tar
  • Import it into my WeIO
  • Modifiy main.py so that you don’t need to know ROM ID upfront and you can connect as many sensor as you want

  •  Run the code

 UART error… and hot fix !

There is still a problem with the UART. From time to time, it’ll throw some errors.

But re-running the program will work after 2 or 3 tries…

UPDATE :

The source of the problem was identified and will be fixed in upcoming release

To fix this problem, you can simply change the file : /weio/IoTPy/pyuper/ioboard.py, line 55  (a soft reset must be done after this change)

 Main sources of informations

How to configure WeIO without Wifi

Although I understand that standard operation of WeIO is mainly based on Wifi, I believe that it should be possible to do initial configuration without Wifi. I mean : Wifi shouldn’t be required to configure… Wifi. It is a kinf of chicken and egg story…

In addition, I don’t have Wifi on my desktop PC. It is wired to my private network. I could have used my laptop… but… no… I wanted to be able to configure it without Wifi.

And it appears to be quite simple once you know were to look. There are a few things to know :

  • WeIO firmware is based on OpenWRT
  • Some WeIO script do the Wifi configuration and revert back to AP mode if if fails
  • You can connect directly to WeIO using USB port as it has an FTDI chip which allows to get to a serial console !

In the end, it is quite simple

How to configure Wifi manually

  • Connect WeIO to a USB port of your PC to the micro USB port available on the WeIO
  • In your favorite terminal emulator (I personnaly use KiTTY), configure the connetion as follow :
    • Connection type : Serial
    • Serial line to connect to : You have to find out which port is used. You may have a look into the device manager to see which one is used (COM 8 for me)
    • Speed : 115200
    • Data bits : 8
    • Stop bit : 1
    • Parity : None
    • Flow control : None

If the device is booted, after connecting, you should have something like that :

  • Just press ENTER and TA DA, root shell should appear

  • Then, you need to edit  /etc/config/wireless.sta to add your own wifi stuff (encryption, ssid and key)

  • Run the Wifi config script to tell WeIO to start in STA mode instead of AP mode

  • soft restart using the soft reset button on the board
  • Wait a little while until leds finished blinking
  • and only STA led should then be solid green
  • You’re now in STA mode and you can connect to it !

If you want a fixed IP

By default, WeIO will get an IP from your DHCP server. If you want to configure an IP without DHCP, you would need to edit /etc/config/network.sta BEFORE running wifi config script.

I did not try though.

A bit of troubleshooting

If WeIO fails to connect to the Wifi (wrong key, Wifi router not accepting connections…), WeIO will automatically revert back to AP mode… which will prevent you from trying to diagnose the source of the issue.

To disable this behavior (not definitively though), before trying to run the config script, run the following :

This will stop WeIO server and prevent it to come back to AP mode and let you the option to diagnose the issue. Once Wifi issue solved, don’t worry : at next reboot, WeIO server sill start again !

 

Credits : This was all done with the help of Uros & Drasko, fathers of WeIO, in the forum. Thank you guys for the quick replies.

 

Received my WeIO :-)

A few weeks months ago, I participated to WeIO funding on Indiegogo. And after (patiently) waiting, I eventually got my WeIO board a week ago !WeIO 640Now, after struggling a little bit to configure it (I have no Wifi on my desktop PC and there is no instruction on how to configure the damn thing without Wifi), I am now going to test the gizmo and see what I can do with it !

A new WiFridge for a start ?