This page is in group Technology and is a blog note where I will try to find out how to have my aquarium’s temperature coming from an IoT box. Hopefully a box. Alternatively but less of IoT data via Apache on my iMac.
The XMOS startKIT was and the XCore-200 eXplorerKIT will stay the basis of my playing around the next year, 2019-2020. I love XC and that architecture too much to let them go. However, I want to find out how to get my data out of my eXplorerKIT and export it to the internet – acting as an IoT component. However, I would like not want to pay any provider’s subscription to get this done. The aquarium temperature or my satisfaction to see it when I’m in Italy in vacation is not compatible with monthly subscriptions.
Perhaps setting på my iMac with an (Apache?) server (and figure out if my ISP accepts it) and then have my data sent from the Aquarium’s startKIT’s via radio to the eXplorerKIT (this is what I have already blogged about: it’s done) and then over USB or Ethernet to a small app that sends data to the server may be the solution. Not that it would be much of IoT, but rather a standard rather old fashioned solution. Or, instead of the iMac then use some small box from out there. Below are some alternatives I look at. Again, it’s the process that is the most important here. I could have just used some box and inserted somebody else’s code and be there by the end of the week.
Adafruit Feather ARM Cortex-M0+ Basic Proto
Already to some degree discussed. I even have the M0 board. But I don’t think it has what I need for IoT.
Thingy:91 by Nordic Semiconductor
The new Thingy:91 from Nordic has a new toolset nRF Connect SDK that is based on Zephyr, according to Elektronikk 06/2019, see Elektronikknet – and the magazine (in Norwegian) here pp10-11 entitled “Nordic åpner markedet for cIoT” (cellular IoT).
OK, the SDK is based on Zephyr – but how easily is it available for target code? I found this on the DevZone:
- FreeRTOS or Zephyr?
- Håkon writes that “We maintain a freertos port in the nRF5 SDK where we provide support, but the zephyr project is a standalone project and its recommended that you get support through their channels. We are developing nRF connect SDK (ncs for short) on top of a zephyr fork, but this one only has official support for nRF9160 at the time of writing this post.“
- I posted a question and there are interesting replies
M5Stack by M5STACK
M5Stack by M5STACK with Zephyr?
This M5 nice system of boards is based on the ESP32 (or ESP-32) System on a Chip (SoC) from Espressif Systems in Shanghai, China. The ESP32 contains one single or dual Tensilica Xtensa LX6 processor(s). Also see The Internet of Things with ESP32. The M5 boards originate from M5STACK. I may also get them on Adafruit. However, from a query at the community there does not seem to be any circuit diagram available. (The ESP32-C from 2020 runs on the RISC-V instruction set, here.)
- Zephyr: See my question at the M5Stack Community at M5Stack and Zephyr RTOS. What I found out prior to this is that there is a Zephyr port to ESP32, see Docs Latest Supported Boards XTENSA Boards ESP32. I don’t know how available this really is
- Other, see separate chapter (below)
M5Stack by M5STACK with Blockly, UI.Flow or MicroPython
- Zephyr, see list (above)
- FreeRTOS seems to have been ported. I have written some on this at My SafeRTOS notes
- According to ESP32 Basic Core IoT Development Kit then “supported development platforms and program languages: Arduino, Blockly language with UIFlow(link), Micropython”
- I have discussed Arduino concurrency above (here). Not interesting
- Andrew Stratton: “If you want to teach concurrency/parallelism – then again, I would go for a Go specific set of blocks – which could nicely allow for go routine, wait groups, channels, etc.”
- Code Highland / Adam (here) when I asked about Scratch: “The relationship between Scratch and Blockly is somewhat indirect. The new, unreleased version of Scratch is being built on top of Blockly, but there’s no formal relationship between Blockly and the release version of Scratch except for inspiration”. In the same thread Erik Pasternak writes that “Blockly isn’t itself a language. It’s a tool for making block languages“
- Aside: I have briefly mentioned Scratch in a lecture (here)
- “Even with all those positives, Blockly isn’t the solution for every app. Here are a few other visual editors that you might find helpful: Scratch Blocks: Designed by the people behind MIT’s Scratch and built on the Blockly code base, Scratch Blocks offers a simplified programming model ideal for young learners. (etc.)” (Introduction to Blockly)
- UiFlow (or UI.Flow) is graphical, as is Blockly. Well, not really. Blockly is a scripting language. “UiFlow is an easy learning web based tools for building M5 app” (here). It seems to be based on Blockly. It has the loop (=endless loop) construct (here). But I don’t think they can have multiple loops
- See my query at Concurrency in Blockly (and UI.Flow) in the Blockly discussion group
- Micropython does not seem to support concurrency directly. However, the
_threadmultithreading support (here) is a subset of the corresponding
CPythonmodule. That module is optional which reads not portable in my ears. Also, the
_thread“module is highly experimental and its API is not yet fully settled and not yet described in this documentation.” However, there are things like
uselect(here) (based on
CPython select) even if the say it’s “not efficient”, so they suggest
pollinstead. To me this is strange since a
defaultstatement is polling, while the most used, without any
default, in principle is implemented with no busy-poll in the lower layers as it would be purely event driven. The scheduler would catch the event in some way, store it in a flag (or perhaps some kind of queue (that may be non-deterministic, disallowed by the Ravenscar profile in the ADA case)) and then the scheduler would of course have to pick out the next event to cause some scheduling. I have discussed some of this in Not so blocking after all
Other ESP32 boards
ESP32 – Getting Started (Apr2019)