nanoAPI is a C API for microcontrollers to develop applications such as mobile robotic toys or interactive and communicating objects.

The library provides low level interfaces and a low footprint, optimized framework to separate the application from all the hardware management.

In combination with the comObject solution, nanoAPI based objects can be easily connected with the internet and online sevices. Using a simple and efficient serial protocol, applications can define high level commands exchanged between the device and a remote server or personnal computer.

Features provided by the library are detailled in the following tables:
• Hardware management
• Sound related features
• User interfaces
• Communication
• Miscelaneous


Hardware management
Motor management Functions for DC motor control using PWM signals. Variable speed settings with open loop or closed loop control and a complete motion library for a wheeled mobile toy.

Proximity sensors management Functions for Infrared proximity sensors management and low level acquisition alogrithm for efficient detections such as:
• obstacle avoidance
• edge detection
• basic navigation
• and more...

Automatic calibration of sensors to be as independent as possible from the environment.

Accelerometer management 2D or 3D accelometer management using low level filtering and processing for efficient event detections such as:
• shock and blocked detection
• touched detection
• cherrished detection
• shaken detection
• and more...

Battery management Battery management and profiling for evaluation of remaining battery life. Toy behavior can be associated with current battery level.



Sound related features
Sound streaming Using the comObject solution, any sound file can be streamed from a remote server to a nanoAPI based device, without limitation in the duration of the streamed sound, and without blocking the main application.

Sound download Any sound file, such as sound effects and music, can be played at anytime without stopping the main application.
Using the comObject solution, any sound file can also be downloaded to the embedded flash memory on a nanoAPI based devices.
Files can be later deleted, updated and changed.

Voice commands recognition Voice commands, using keywords recognition, can be programmed to trigger special actions.
The word recognition can be speaker dependent (user will record his or her own commands), or speaker independent (keywords are set on production and cannot be customized).
Both recognition types are fully supported by the library.



User interace
Multicolor led management Simple commands are available to manage multicolor LED, and complex effects are possible such as:
• pulsate effects, fade in, fade out
• continuous sequences
• variable intensity

LCD screen management High level functions are provided for text based information display, and simple graphical lcd icons. More complex customized display interface can be implemented on request.



Communication
Point to Point communication with a computer A simple and efficient serial protocol is availbe to manage communication with a remote computer. A set of custom commands can be defined for specific applications. Using the comObject solution, such commands can be relayed to and from a remote server to create interactions with a website or any webservices.
nanoAPI based devices can be fully remote controlled using this serial protocol.

Networked communication nanoAPI devices can be networked using a proprietary protocol and fixed size packet communication.

Firmware upgrade Using a failsafe firmware uploading mechanism, the application on a nanoAPI device can be upgraded from a computer. Using the comObject solution, firmware can even be automatically downloaded from a remote server, allowing transparent application update on new relase.



Miscelaneous
Periodic tasks management Periodic tasks can be defined inside the application with a 1ms resolution, providing a powerfull and easy to use method to design time based behaviours.

Event management nanoAPI provides a generic event manager for the application to manage efficiently interactions with the user and the environment. All events can debounced for a more robust interpretation of sensor triggered events.