HomeElectronicsBuild a Smart Lamp Using an Analog Discovery Pro ADP3450

Build a Smart Lamp Using an Analog Discovery Pro ADP3450

This is the first part of a series of four blog posts where we will design a smart RGB lamp that is powered by a battery and controlled through an app running on a smartphone. Lamp and smartphone communicate through Bluetooth Low Energy (BLE). Besides setting the luminosity and the color of the LED, the system also measures the ambient lighting, so users can switch off the light once it is no longer needed. Or do that even automatically, if needed.

Digilent’s Analog Discovery Pro ADP3450 running in Linux Mode is at the heart of the system: it collects the data from a Pmod ALS ambient light sensor and receives the settings from the smartphone’s app through a Pmod BLE. It also applies the brightness and color of the LED based on these data sets or switches to the on/off state.

In our project, we control the Analog Discovery Pro (ADP) through the WaveForms SDK with a Python script. For this, we need several functions for each of the instruments, like read, write, and initialization and control functions. Communication over SPI (Serial Peripheral Interface) and UART (Universal Asynchronous Receiver-Transmitter) is also necessary. This means that we require some sort of abstraction to simplify the interaction with the hardware: a Hardware Abstraction Layer (HAL).

There are two ways to get the HAL functions for our project: One way is that you follow the directions given in the Getting Started with WaveForms SDK guide. The other way is that you download them from Digilent’s GitHub repository. There, you will also find a list of the functionality each module provides and a couple of test routines.

Once you created or downloaded the HAL functions for the SDK, create a new folder and copy the files into it. Also, duplicate the file dwfconstants.py from the Python examples folder of your WaveForms installation into the new directory. The default installation path is C:\Program Files (x86)\Digilent\WaveFormsSDK\samples\py\dwfconstants.py. This file contains all the constants used by the SDK.

Now that you have created or copied the HAL functions, you are done with this part of the blog post series. In the next installment, we’ll talk about the library for the Pmods, testing their functionality, and generating the Android app.

Please click on the link below to view the rest of the Blog.

Build a Smart Lamp Using an Analog Discovery Pro ADP3450 – Part 2

Build a Smart Lamp Using an Analog Discovery Pro ADP3450 – Part 3

Build a Smart Lamp Using an Analog Discovery Pro ADP3450 – Part 4

 

ELE Times Bureau
ELE Times Bureauhttps://www.eletimes.ai/
ELE Times provides a comprehensive global coverage of Electronics, Technology and the Market. In addition to providing in depth articles, ELE Times attracts the industry’s largest, qualified and highly engaged audiences, who appreciate our timely, relevant content and popular formats. ELE Times helps you build awareness, drive traffic, communicate your offerings to right audience, generate leads and sell your products better.

Related News

Must Read

US Rapid-Tracks ‘Containerised Laser’ Weapons for Drones and Missiles

The United States finalized two Joint High Energy Laser...

Indigenous Sonars Reinforce New Naval Warships

India has deployed indigenous sonars on board two newly...

TigerShark Set to Implement F1 Engineering Techniques on Extended-Range Missions.

The British company MGI Engineering is developing TigerShark- an...

Japan Set to Demonstrate Helsing’s AI-Based HX-2 Strike Drone

Japan’s Ground Self-Defence Force will field test the HX-2...

Cobra 600 Drone Air Defence Goes Beyond Ground Launchers

Germany’s POLARIS Spaceplanes has flown the COBRA 600, an...

Indian Railways Plans to Offer EV Charging Infrastructure at Railway Stations

Indian Railways is planning to offer charging stations for...

JSW MG Motor India Set to Launch Electric SUV

JSW MG Motor India is all set to roll...

Omega Seiki Mobility Partners with Electra AI for Battery Health Intelligence

​Omega Seiki Mobility (OSM) has joined hands with ELECTRA...

Gulf Oil to Expand EV Charger Capacity with Rs 50 Crore Investment

​Gulf Oil is investing Rs 50 crore to scale...

Brandworks Technologies Receives ECMS Approval for Speakers & Microphones

Brandworks Technologies Pvt. Ltd., India's fastest-growing design-driven and R&D-led...