Using the Atmo API

Atmosphere comes equipped with the Atmo API that can be used with your project through Embedded View’s code editor. Written in C, the Atmo API is divided into several types which include the base peripheral drivers, protocol-specific functions, and support for third party hardware drivers such as sensors and external devices.

When an embedded element is added to the Studio canvas, its embedded code is displayed in the code editor.

This code can be modified using the Atmo API to expand the functionality of your project. Each embedded element corresponds to a driver within the Atmo API. From the code editor, you can click theAPIsbutton to display the full list of APIs and their functions, then click a function to dynamically add it to the code editor at line the text cursor is on.

Atmo API Drivers

The Atmo API’s drivers allow you to interface with low-level hardware, primarily for basic functionality with peripherals such as GPIO, PWM, ADC, I2C, SPI, and UART. These are a set of common APIs that can be found on any Atmosphere supported device. The API was designed and built in a way that makes it portable from processor to processor, and allows you to easily port higher-level drivers and applications from one platform to another.

Select a driver to learn more about the API’s functions and usage:

Driver General Usage
ADC Driver Interacting with ADC functions.
BLE Driver Controlling advanced settings and BLE features such as advertising data, notifications, and GATT characteristics.
Block Driver Used by the file system driver to talk to low-level storage, such as a SPI flash or SD card.
Cloud Driver Communicating with Atmosphere, such as sending/receiving data and registering a device.
Core Driver Basic functions within the platform.
Date / Time Driver Keeping track of the date and time.
File System Driver Reading and writing of files.
GPIO Driver Interacting with a device’s GPIO pins.
I2C Driver Working with I2C devices.
Interval Driver Registering abilities to execute at a given interval of time.
PWM Driver Interacting with PWM functions.
Ring Buffer Driver Generic data structures.
SPI Driver Working with SPI devices.
UART Driver Communicating over a device’s UART line.