Posts with «software» label

Arduino IoT Cloud: Dynamic Dashboard

In this short article we are going to have a look at a new exciting feature: theDynamic Dashboard of Arduino IoT Cloud.

Among other things with Arduino IoT Cloud you can create a dashboard to monitor data and interact with your project.

If you want to know more about properties and widgets you can go here

Now it’s possible to arrange the widgets as you like. You can also increase their size and move them around following your needs.

In order to resize them simply drag the small resize handle in the right bottom corner of each widget. This way they become dynamic and the widgets below will adjust and rearrange accordingly.

How to resize properties boxes

For now, Location and String are the only resizable widgets.

If you want to move the properties around just click and drag the title area.

How to move properties boxes

Below you can see the callbacks used in this easy example

void onLatitudeChange() {
  lat = Latitude;
  GPS = {lat, lon};
  Locations += "lat: " + String(lat) + "; " + "lon: " + String(lon) + "\n";
  Movements ++;
}


void onLongitudeChange() {
  lon = Longitude;
  GPS = {lat, lon};
  Locations += "lat: " + String(lat) + "; " + "lon: " + String(lon) + "\n";
  Movements ++;
}

If you want to further experiment on how multi-value properties work here’s an example

References

Arduino IoT Cloud: April’s New Features

In this short article, we are going to provide an overview of all the new and exciting features the team has been working on.

Multi-Value Property Types: The first two types implemented are Location and Color. With Color, you can pick a color from the palette (clicking on it) or just show one in a small window. With Location, you can see a pin on a map and move it; furthermore, you can drag the box and make it bigger

The number of property types is huge, allowing you to pick the one that best suits your needs. All the possible values are taken from the SenML standard.

Shadow Thing: If a device happens to disconnect from the Cloud, as soon as it reconnects, the board will get back its previous property values. For example, if a property controls the status of a lamp, and the lamp property is set to on, the light will be kept on when the device comes back online.

Simply Discover Your Thing ID and Device ID: The panel showing information about its associated board is opened by default, making it easier to read details about the board you are using.

Getting Started Procedure: The procedure is now faster and more reliable, thanks to bug-fixing and a new connection template used in the Cloud_blink sketch.

Mondrian clock software release

Unbelievably, there is still demand for the Dual LED matrix shield for Arduino, which also pressures me to maintain and upgrade the supporting software, usually on client's request.
And that is how the Mondrian clock got a couple of new display modes: one picked directly from the Cube clock, showing just hours and minutes, the other one an improvement of the same, with the addition of a red dot moving around the rectangular clock face to indicate the seconds.
The display mode changes when both buttons are pressed simultaneously.

Here is the clock in action.


The Mondrian clock uses the Dual LED matrix shield and wsduino (as an RTC-equipped and XBee-supporting Arduino-compatible).
The code is available here. There is no GPS support, but that can be copied and adapted from the previous version of Mondrian software.

Note that the LED matrix shield was designed to accommodate either the common-anode or the common-cathode LED matrices, by soldering the correct LED driver, either A2982 or ULN2803 respectively. In the software, use either one of these defines:
#define _COMMON_ANODE_
//#define _COMMON_CATHODE_

The only user interface on the shield is the pair of buttons. Pressing the left one will increment the hours, the right one will increment the minutes, while the seconds are always reset.
By pressing both buttons at once, the display mode cycles through Mondrian mode (red hours, green minutes, orange seconds), 24-hour mode (HH:MM in green), 12-hour mode (HH:MM in orange), and moving second red dot (12-hour, HH:MM in green, more square font).

Getting started with the Arduino IoT Cloud

As previously announced, the Arduino IoT Cloud is an easy to use Internet of Things application platform that enables developers to go from unboxing their board to a working device in just minutes.

To help you get started, we’ve put together a quick project that’ll walk you through connecting a MKR1000 (or MKR WiFi 1010) to the Arduino IoT Cloud.

By the end of the tutorial, you’ll be able to control and monitor your board over the Internet using the Arduino IoT Cloud site.

First, we’ll add the board to the Arduino IoT Cloud as a Thing — a representation of the board in the cloud. We’ll then give the Thing a set of Properties which represent sensors, LEDs, motors, and many other components in the project that you’ll want to access from the cloud.

Want to see more? You can find the entire step-by-step guide here.

Announcing the Arduino IoT Cloud Public Beta

In our pursuit to democratize Internet of Things development, today we are excited to announce the Arduino IoT Cloud!

The Arduino IoT Cloud is an easy-to-use platform that makes it very simple for anyone to develop and manage their IoT applications, then deploy them to a large number of users. It allows users to create applications that solve real-life problems, and hopefully, improve their lives.

With the launch of the Arduino IoT Cloud, Arduino now provides its one million users a complete end-to-end approach to IoT that includes hardware, firmware, cloud services, and knowledge. After six months of private beta testing, I am very pleased to release the public beta of the Arduino IoT Cloud with automatic dashboard generation, Webhooks support, and full TLS secure transport.

— Luca Cipriani, Arduino CIO

Convenience and flexibility are key considerations for the Arduino IoT Cloud. Arduino boards usually require you to program them by entering code by way of a sketch — now the Arduino IoT Cloud can do this for you. It will quickly and automatically generate a sketch when setting up a new thing, thus enabling a developer to go from unboxing their board to a working device within five minutes. The Arduino IoT Cloud also provides other methods of interaction, including HTTP REST API, MQTT, Command-Line Tools, Javascript, and Websockets.

Going from an idea to a fully-functional IoT device has been a tedious process even for the most advanced engineers and developers… until now. Arduino now offers a complete platform with the MKR family providing a streamlined way to create local IoT nodes and edge devices using a range of connectivity options and compatibility with third-party hardware, gateway, and cloud systems. Whilst the Arduino IoT Cloud lets users manage, configure and connect not only Arduino hardware but the vast majority of Linux-based devices — truly democratizing IoT development.
— Massimo Banzi, Arduino CTO and Co-Founder

Want to learn more or try out the Arduino IoT Cloud for yourself? You’re just a click away!

Announcing the Arduino Command Line Interface (CLI)

The Arduino team has been working hard to support the needs of our professional developer community. Many of you requested a way to use our tools in Makefiles, and wanted Arduino IDE features available via a fast, clean command line interface.  How cool would it be to install project dependencies with:

arduino-cli lib install “WiFi101” “WiFi101OTA”

So that’s what we’ve done! To make it even cooler, most Arduino CLI commands have the option to output JSON for easy parsing by other programs:

arduino-cli –format json lib search wifinina

{“libraries”:[{“Name”:”WiFiNINA”,”Releases”:{“1.0.0”:{“Author”:”Arduino”,”Version”:”1.0.0″,”Maintainer”:”Arduino \u003cinfo@arduino.cc\u003e”,”Sentence”:”Enables network connection (local and Internet) with the Arduino MKR WiFi 1010, Arduino MKR VIDOR 4000 and Arduino UNO WiFi Rev.2.”,”Paragraph”:”With this library you can instantiate Servers, Clients and send/receive UDP packets through WiFi. The board can connect either to open or encrypted networks (WEP, WPA). The IP address can be assigned statically or through a DHCP. The library can also manage DNS.”,”Website”:”http://www.arduino.cc/en/Reference/WiFiNINA”,”Category”:”Communication”,”Architectures”:[“*”],”Types”:[“Arduino”],”Resource”:{“URL”:”http://downloads.arduino.cc/libraries/github.com/arduino-libraries/WiFiNINA-1.0.0.zip”,”ArchiveFileName”:”WiFiNINA-1.0.0.zip”,”Checksum”:”SHA-256:79f133fedf86411ca7add773a4293137dec057a3b8f1a7904db2d444ed8f4246″,”Size”:65651,”CachePath”:”libraries”}}}}]}

The other big news is you can run Arduino CLI on both ARM and Intel (x86, x86_64) architectures. This means you can install Arduino CLI on a Raspberry Pi or on your servers, and use it to compile Sketches targeting the board of your choice (Don’t forget you can also remotely manage your Linux device with Arduino Create Device Manager!)

Getting Started

This first release is an alpha, and we would like your feedback to help us improve it. You can download the Arduino CLI alpha preview binaries from:

Linux (64-bit): https://downloads.arduino.cc/arduino-cli/0.1.0-alpha.preview/arduino-cli-0.1.0-alpha.preview-linux64.tar.bz2

Linux (32-bit): https://downloads.arduino.cc/arduino-cli/0.1.0-alpha.preview/arduino-cli-0.1.0-alpha.preview-linux32.tar.bz2

Linux (ARM): https://downloads.arduino.cc/arduino-cli/0.1.0-alpha.preview/arduino-cli-0.1.0-alpha.preview-linuxarm.tar.bz2

OSX: https://downloads.arduino.cc/arduino-cli/0.1.0-alpha.preview/arduino-cli-0.1.0-alpha.preview-osx.zip

Windows: https://downloads.arduino.cc/arduino-cli/0.1.0-alpha.preview/arduino-cli-0.1.0-alpha.preview-windows.zip

Once you’ve installed Arduino CLI, you can try it out using our getting started guide: https://github.com/arduino/arduino-cli#getting-started

The Arduino CLI code repository is also available at: https://github.com/arduino/arduino-cli. As usual, it’s open source – but if you’re a company who wants to use it to create a customized tool, you can also contact us for a commercial license.

Integrate Arduino Support Into Your Preferred Platform

After we used Arduino CLI for awhile, we decided to make it the standard way our software communicates. Imagine having the Arduino IDE or Arduino Create Editor speaking directly to Arduino CLI – and you having full control of it. You will be able to compile on your machine or on our online servers, detect your board or create your own IDE on top of it!

We want you to be able to add Arduino support to whatever development flow you prefer. Whether you use Atom, Eclipse, Emacs, Vim, VSCode, or are even building your own tools, Arduino CLI makes this possible. Let us know what you think!

Display Abstraction Layer


"Software never dies", the saying goes. But to help that happen, the software should be as independent as possible from the hardware it uses. Today, we are getting closer to this goal by introducing the Display Abstraction Layer (DAL), a simple framework that allows displaying on any suitable device. The implementation is based on polymorphism: using a virtual class when writing to the display, but instantiating a concrete display class depending on the device being written to. Each device requires its own concrete class that implements a set of functions (defined in the virtual class) used for outputting to the display. Thus every concrete display class becomes a simple “device driver” for the specific display device that was written for.

A class diagram of the DAL framework is shown below.










This is nothing revolutionary, just a simple solution that should have been there (in projects using displays) from the beginning. It provides an easy adaptation between the project functionality and the display, and also reduces the effort of portability to just implementing a class for the new display.

The DAL interface consists of a set of function definitions used to output to the display. This set of functions depends on the project. That means that the DAL interface for WiFiChron will be different from the one for WiseClock. For example, in the case of WiFiChron, there are only 4 functions dealing with the display that need to be implemented:

    void setup();
    void writeDisplay (char* displayBuffer);
    void setBrightness(uint8_t brightness);
    void reset();

WiseClock uses a lot more display functions (currently defined in HT1632.h):

  void setup();
  void clear();
  void setBrightness(byte level);
  void snapshot_shadowram();
  byte get_snapshotram   (coord_t x, int8_t y);
  byte get_shadowram     (coord_t x, int8_t y);
  void clearSnapshot     ();
  void clearSnapshot     (int8_t dispNo = 0);
  void copyToVideo       (byte chipNo, char* vbuffer);
  void overlayWithSnapshotHorizontal(int8_t y);
  void overlayWithSnapshotVertical  (coord_t x);
  void plot         (coord_t x, int8_t y, byte color);
  void line         (coord_t x1, int8_t y1, coord_t x2, int8_t y2, byte val);
  void putChar      (coord_t x, int8_t y, char c, byte color);
  void putTinyChar  (coord_t x, int8_t y, char c, byte color);
  coord_t       putLargeChar (coord_t x, int8_t y, char c, byte color);
  void putBigDigit  (coord_t x, int8_t y, int8_t digit, int8_t fontNbr, byte color, int8_t columns);
  void putFullDigit (coord_t x, int8_t y, uint8_t digit, byte color, byte fontNumber=0);
  void putBitmap    (coord_t x, int8_t y, byte indexBmp, byte color=ORANGE);
  void putString    (coord_t x, int8_t y, const char* str, byte color);
  void putTinyString(coord_t x, int8_t y, const char* str, byte color);
  void displayStaticLine  (char* text, int8_t y, byte color);
  void displayStaticLine_P(const char* text, int8_t y, byte color);

Currently, I have implemented and tested a bunch of display classes for HDSPwise clock (the simpler version of WiFiChron). These include support for HDSP2534, DL1414, OLED (132x64). The common characteristic of these displays, that makes them suitable for the HDSP clock/WiFiChron, is that all of them can display 8 characters that can then be scrolled horizontally.


Wise time with Arduino 11 Aug 16:15
software  

H2gO Keeps Us from Drying Out

The scientific community cannot always agree on how much water a person needs in a day, and since we are not Fremen, we should give it more thought than we do. For many people, remembering to take a sip now and then is all we need and the H2gO is built to remind [Angeliki Beyko] when to reach for the water bottle. A kitchen timer would probably get the job done, but we can assure you, that is not how we do things around here.

A cast silicone droplet lights up to show how much water you have drunk and pressing the center of the device means you have taken a drink. Under the hood, you find a twelve-node NeoPixel ring, a twelve millimeter momentary switch, and an Arduino Pro Mini holding it all together. A GitHub repo is linked in the article where you can find Arduino code, the droplet model, and links to all the parts. I do not think we will need a device to remind us when to use the bathroom after all this water.

Another intrepid hacker seeks to measure a person’s intake while another measures output.

New search engine and Arduino reference!

The Arduino web team has working hard behind the scenes improving our legacy systems. Now, it’s time to work on something more interesting for the team and more useful for our community! From here on out, we will update you every month on the latest and greatest activities…

Today, we are announcing a pair of major features that are only a mere preview of what you can expect to see from an Arduino user’s point of view:

  • The blog has a new search engine that is much faster, more precise, and allows readers to filter results.
  • The Arduino reference is now quicker,  mobile-friendly, and completely open to contributions. You can check out our GitHub reference repo here.

Let’s look at how those two features work and how they are implemented. The search engine is powered by our provider Algolia, offering an impressively fast search engine and enhanced UX. Our goal is to integrate it with each of our websites and finally have a unified search for all Arduino-related content.

We are going to be testing the search engine for a bit on the blog and eventually roll it out to our websites.

Perhaps what we are most proud of, though, is the new reference engine:

  • Arduino users can directly contribute to the reference by creating a pull request here.
  • We are going to support multiple languages. In fact, some users have already helped us in creating French, German, Korean, Italian, Japanese, Portuguese, and Spanish versions.
  • As soon as a new pull request has been merged, the system deploys to our website automatically, and if someone modifies the English version of the reference, all other language repositories are going to be notified as well.

This is just the beginning with much more to come. Stay tuned!

Arduino Blog 14 Dec 16:28

Arduino Create comes to Chrome OS devices!

Arduino Create is now available to everyone on Chrome OS devices, with $0.99 per month subscription. An Arduino account and Google ID is all you need to use it, just follow the Create Getting Started guide on your Chrome OS device. We are actively working on specific licensing and pricing for schools, so stay tuned.

The new Arduino Create Chrome App enables students and other users to write code, access tutorials, configure boards, and share projects. Designed to provide a continuous workflow from inspiration to implementation, Makers can easily manage every aspect of their project right from a single dashboard.

Developed with the classroom in mind: The Arduino Chrome App allows you to teach and tinker with Arduino electronics and programming in a collaborative, always-up-to-date environment.

Built for Chrome OS: Code online, save your sketches in the cloud, and upload them to any Arduino connected to your Chrome OS device, without having to install anything locally. All the contributed libraries are automatically included.

The following Arduinos are currently supported: Uno, 101, Mega, Esplora, Nano (ATmega328), Micro, Zero, MKR1000, MKR Zero, MKR Fox 1200, Pro and Pro Mini (ATmega328). We are actively working with the Chromium team to restore support for the Arduino Leonardo in a future Chrome OS release.

The launch of this app would not have been possible without the following open source components:

As usual if you encounter any bugs, issues, or have an idea on how we can improve the Chrome app, please open a discussion thread on this Forum page.
Please note that this app will work only on Chrome OS, if you click on the Google Store link on any other OS you will not be able to install it.