This is a collection of examples written for the Electric Imp platform. Not all code in this repository is actively maintained, so please submit pull requests if you make improvements to the example code.
In this example, you begin by learning the basics of working with Electric Imp. We will use Electric Imp Libraries to seamlessly connect imp-enabled hardware to Azure IoT Central. Your imp-enabled hardware device will report telemetry and location data through the Electric Imp impCloud into Azure IoT Central. This example uses an impC Breakout Board plus Pixhawk GPS and/or an impExplorer to implement a Asset Tracking demo with IoT Central.
This example uses an impAccelerator Fielbus Gateway and the Electric Imp Modbus Library to monitor the temperature via a Click PLC. The temperature data is sent to Microsoft Azure using the Electic Imp AzureIoTHub libray and can be monitored using Azure IoT Central.
AzureTwins is a library, that helps you work with Azure Twins API. It supports full set of operations provided by the service.
This is software for a low power cellular asset tracker based on the impC001 breakout board. The tracker monitors for movement, and if movement has been detected it will report daily, otherwise the device will report once a week sending GPS location, battery status, and movement status.
Example code for a secure remote serial console
SWDFlasher-STM32 is an imp application that can be used to flash the STM32F100 MCU. Its agent downloads a firmware image via HTTPS and then transmits it to the device, which uses the SWD protocol to program the MCU.
Sample code demonstrating BlinkUp™ via Bluetooth LE on imp004m.
Control Electric Imp Platform-based Internet of Things devices from your Apple Watch.
These examples show how to use the imp API hardware.bluetooth to create iBeacon advertisers and listeners. These examples use 2 imp004m breakout boards with w1, w2, w5, and w7 connected to enable bluetooth. One imp004m creates an iBeacon formatted advertisement and broadcasts it via the imp API hardware.bluetooth. The other imp004m uses the imp API hardware.bluetooth to scan for iBeacons with the same UUID that the the first imp is broadcasting. One example shows a passive scan, the other uses an active scan to broadcast device state info using a scan response.
A series of eight examples for use with the sensors on the impExplorer Developer Kit, impAccelerator Battery Powered Sensor Node or impC001 Breakout Board Kit. These examples range from simple to advanced programming. Each example builds on the skills learned in the previous example. Please note that the first few examples are not power efficient and will drain battery powered devices quickly.
This example demonstrates the use of the impCentral™ API to retrieve information about your development devices and use that data to generate a live web-based status readout via HTML, JavaScript and jQuery.
This example contains a function used for searching for a specific path within an XML string. It supports sibling tags with the same name but does not support nested tags with the same name. It can be used synchronously or asynchronously and the README contains examples of both.
This example has simple code for reading temperature from a thermocouple click board and also an application that sends temperature data to Initial State. The thermocouple runs on 3.3v. The range of the thermocouple is -270 to 1372 degrees celsius. These examples are written for use with an impAccelerator Fielbus Gateway, but can be easily modified for use with any imp.
This example contains a facial recognition application and a driver class for the OV2640 ArduCAM. The camera driver can be used to develop other camera applications. The facial recognition application uses the Kairos Facial Recognition API to detect and recognize faces. To run this application you will need to set up an account on Kairos.
This is example code for using the imp with Google Calendar. The example provided allows you to schedule turning on lights on the device (an imp explorer kit) by adding an event titled "lights" to your calendar. The example code, however, also provides methods within a GoogleCalendar class which let you schedule, modify, delete, and view events from your calendar. By setting them up with device.on
calls from the agent and device.send
calls from the device, you can perform these actions by interacting with the device as well.
Examples for use with the Imp005 EZ Eval board.
This example was written for the Battery Powered Sensor Node to determine the battery voltage. The battery class included in this example can be used for other devices as long as there is an analog pin that is connected directly to the battery. Please note this code is not usable for determining the battery voltage on the impExplorer Developer Kit, since no analog pins are connected directly to the battery.
This example uses an impAccelerator Fielbus Gateway and the Electric Imp Modbus Library to monitor the temperature via a Click PLC.
This example transmits accelerometer data from an Arduino Feather with a LoRa RH_RF95 to an impAccelerator Wireless Gateway with a LoRa RN2903 radio.
This example contains an example of factory firmware code. It uses an impFactory™ as the factory fixture and impAccelerator™ Battery Powered Sensor Nodes as the devices being tested and produced.
This example shows a low power application for the ImpAccelerator Battery Powered Sensor node that takes environmental sensor readings.
This example uses an impAccelerator Fielbus Gateway and the Electric Imp Modbus Library to contol and monitor a pump via a Click PLC.
The SX1509 class interfaces with the SX1509 IO expander. It sits on the I2C bus and data can be directed to the connected devices via its I2C address. Interrupts from the devices can be fed back to the imp via the configured imp hardware pin.
This code remains a primarily as a reference for emma reference design.
This example uses an imp to control the motor on a snack dispenser. The agent serves a webpage with a form used to dispense candy.
Build an internet-connected thermal printer with an electric imp. Instructable code.
This example code is intended to be used with the imp002-EVB guide on the Electric Imp Developer Center.
Outdated factory code example.
This code remains a primarily as a reference for flora reference design.
This example uses Input/Output Ports, which have been replaced by Agents and HTTP request-based communication. This code will not work as currently written, but remains primarily as a reference for older designs.
This example uses Input/Output Ports, which have been replaced by Agents and HTTP request-based communication. This code will not work as currently written, but remains primarily as a reference for older designs.
This example uses Input/Output Ports, which have been replaced by Agents and HTTP request-based communication. This code will not work as currently written, but remains primarily as a reference for older designs.
This example uses Input/Output Ports, which have been replaced by Agents and HTTP request-based communication. This code will not work as currently written, but remains primarily as a reference for older designs.
This example uses Input/Output Ports, which have been replaced by Agents and HTTP request-based communication. This code will not work as currently written, but remains primarily as a reference for older designs.
This example uses Input/Output Ports, which have been replaced by Agents and HTTP request-based communication. This code will not work as currently written, but remains primarily as a reference for older designs.
Example code for 9dof and env sensor tails.
The Sana reference design implements an internet-connected universal remote.
FutureStack Badge reference code.
These examples were used for Dreamforce 2014 workshops.
This is a very basic TTS example intended to demonstrate the absolute bare minimum to get up and running with audio.
This example shows a simple example of how to wrap the Fixed-Frequency DAC class to play back analog waveforms, and a simple example of how to wrap the Sampler class to record analog waveforms.
Lala is a battery-powered audio recording and playback impee with 4MB onboard SPI flash memory. Lala is designed as a starting point for building an asynchronous message delivery system, like an intercom
This code remains a primarily as a reference for hannah reference design.
Olive is a reference design for an RFID/NFC reader connected to an Electric Imp. The example here is not complete reference code.
This example demonstrates how to set the color of an RGB LED based on data received via an incoming HTTP request.
This Lala Voice Recorder is a simple wifi voice recorder.
Electric Imp's Point of Sale Demo.
This is a sample application used to demonstrate how to pass messages between device and agent. It can also be used to view latency times of the Electric Imp platform.
The goal of the shelºF project was to build a smarter internet connected thermostat system.
This example demonstrates how to trigger a solenoid whenever an incoming HTTP request is received. In our example, the solenoid strikes a cowbell!
This example demonstrates basic digital IO.
This example demonstrates how we can make a web request to any URL when a button is pressed. In this example, we're making a request to our Internet-Connected Cowbell
This example demonstrates how to control a PowerSwitch Tail II from an HTTPS endpoint. In this example, we've also implemented a basic agent webpage, and some "security" (a password field that must match).
This example counts incoming requests (based on a particular key) and reacts in two ways: it moves a servo to the left or right to indicate a Tug-Of-War and it displays the number of 'left' and 'right' requests that have come in since the code started running.
This example demonstrates how to send temperature data to Keen IO every minute.
These examples are licensed under the MIT License.