Hardware components | ||||||
| × | 1 | ||||
Software apps and online services | ||||||
| ||||||
Hand tools and fabrication machines | ||||||
|
I made this project because in India, the problems faced in metropolitan areas is air pollution. So this is going to be a system that will measure the air quality and will warn if it is required to wear a mask or not,
BILL OF THE MATERIALS- NXP Rapid IOT Prototyping kit - INR 3500
- Rapid prototyping Kit will measure the air quality
- If the air quality is less than 175 ppm then the RGB led will turn green indicating safe air
- If the air quality is more than 175 ppm then the RGB led will turn green and the buzzer will start beeping indicating harmful air
- The principle is very simple making it easier to use.
- USE THE RIGHT TOUCH ELECTRODE TO NAVIGATE TO AIR QUALITY PAGE AND PRESS THE TOP RIGHT BUTTON TO MOVE TO HOME PAGE.
It can be used as a wearable device as a air pollution monitor or can be mounted on a wall of a room to measure its indoor air quality or on the balcony to measure the outside air quality and much more.(via double sided tape).
ADVANTAGES- It doesn't depends on the internet connections, therefore it can be used in any remote areas
- It can work wirelessly as it has an independent battery.
- Finally, its principle is very easy, as mentioned above, thereby making it using easier.
To upload the firmware as given in the project follow the steps :
Before loading your own custom firmware, make sure you saved your project. Then click the compile button which is located in the upper right part of the IDE. If everything is fine, a notification will prompt the the compilation is successful. Click the download button which will then download the firmware of the device (*.bin).
In uploading the firmware to the device, follow the instructions which can be found here on how to upload the firmware to the device. All of the instructions that I said from compilation, downloading the firmware up until uploading it in the device is discussed in that document. (Page 133 - 134)
The firmware can be downloaded from the link in the project
TESTING#include "callbacks.h"
//HEADER START
//HEADER END
void ATMO_Setup() {
}
ATMO_Status_t Interval_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t Interval_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_INTERVAL_Handle_t intervalHandle;
ATMO_INTERVAL_AddAbilityInterval(
ATMO_PROPERTY(Interval, instance),
ATMO_ABILITY(Interval, interval),
ATMO_PROPERTY(Interval, time),
&intervalHandle
);
return ATMO_Status_Success;
}
ATMO_Status_t Interval_interval(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t CCS811AirQuality_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t CCS811AirQuality_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_CCS811_Config_t config;
config.operatingMode = ATMO_PROPERTY(CCS811AirQuality, operatingMode);
config.address = ATMO_PROPERTY(CCS811AirQuality, i2cAddress);
config.i2cDriverInstance = ATMO_PROPERTY(CCS811AirQuality, i2cInstance);
return ( ATMO_CCS811_Init(&config) == ATMO_CCS811_Status_Success ) ? ATMO_Status_Success : ATMO_Status_Fail;
}
ATMO_Status_t CCS811AirQuality_setEnabled(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_CCS811_SetEnabled(true);
return ATMO_Status_Success;
}
ATMO_Status_t CCS811AirQuality_setDisabled(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_CCS811_SetEnabled(false);
return ATMO_Status_Success;
}
ATMO_Status_t CCS811AirQuality_setEnabledDisabled(ATMO_Value_t *in, ATMO_Value_t *out) {
bool enabled = false;
ATMO_GetBool(in, &enabled);
ATMO_CCS811_SetEnabled(enabled);
return ATMO_Status_Success;
}
ATMO_Status_t CCS811AirQuality_readTVOC(ATMO_Value_t *in, ATMO_Value_t *out) {
uint16_t tvoc;
if(ATMO_CCS811_GetTVOC(&tvoc) == ATMO_CCS811_Status_Success)
{
ATMO_CreateValueUnsignedInt(out, (unsigned int)tvoc);
}
else
{
ATMO_CreateValueVoid(out);
}
return ATMO_Status_Success;
}
ATMO_Status_t CCS811AirQuality_readCO2(ATMO_Value_t *in, ATMO_Value_t *out) {
uint16_t co2;
if(ATMO_CCS811_GetCO2(&co2) == ATMO_CCS811_Status_Success)
{
ATMO_CreateValueInt(out, (int)co2);
}
else
{
ATMO_CreateValueVoid(out);
}
return ATMO_Status_Success;
}
ATMO_Status_t Function_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t Greater_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t Greater_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t Greater_evaluate(ATMO_Value_t *in, ATMO_Value_t *out) {
bool conditionTrue = false;
// Convert property to same type as input
ATMO_Value_t targetStr;
ATMO_Value_t targetNum;
ATMO_InitValue(&targetStr);
ATMO_InitValue(&targetNum);
ATMO_CreateValueString(&targetStr, ATMO_PROPERTY(Greater, target));
ATMO_CreateValueConverted(&targetNum, in->type, &targetStr);
if(ATMO_CompareValues(in, &targetNum, ATMO_PROPERTY(Greater, condition), &conditionTrue) != ATMO_Status_Success)
{
ATMO_Value_t value;
ATMO_InitValue(&value);
ATMO_TriggerHandler(ATMO_TRIGGER(Greater, invalidType), NULL);
ATMO_FreeValue(&value);
ATMO_FreeValue(&targetStr);
ATMO_FreeValue(&targetNum);
return ATMO_Status_Fail;
}
ATMO_FreeValue(&targetStr);
ATMO_FreeValue(&targetNum);
if(conditionTrue)
{
ATMO_Value_t value;
ATMO_InitValue(&value);
ATMO_TriggerHandler(ATMO_TRIGGER(Greater, conditionTrue), NULL);
ATMO_FreeValue(&value);
}
else
{
ATMO_Value_t value;
ATMO_InitValue(&value);
ATMO_TriggerHandler(ATMO_TRIGGER(Greater, conditionFalse), NULL);
ATMO_FreeValue(&value);
}
return ATMO_Status_Success;
}
ATMO_Status_t less_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t less_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t less_evaluate(ATMO_Value_t *in, ATMO_Value_t *out) {
bool conditionTrue = false;
// Convert property to same type as input
ATMO_Value_t targetStr;
ATMO_Value_t targetNum;
ATMO_InitValue(&targetStr);
ATMO_InitValue(&targetNum);
ATMO_CreateValueString(&targetStr, ATMO_PROPERTY(less, target));
ATMO_CreateValueConverted(&targetNum, in->type, &targetStr);
if(ATMO_CompareValues(in, &targetNum, ATMO_PROPERTY(less, condition), &conditionTrue) != ATMO_Status_Success)
{
ATMO_Value_t value;
ATMO_InitValue(&value);
ATMO_TriggerHandler(ATMO_TRIGGER(less, invalidType), NULL);
ATMO_FreeValue(&value);
ATMO_FreeValue(&targetStr);
ATMO_FreeValue(&targetNum);
return ATMO_Status_Fail;
}
ATMO_FreeValue(&targetStr);
ATMO_FreeValue(&targetNum);
if(conditionTrue)
{
ATMO_Value_t value;
ATMO_InitValue(&value);
ATMO_TriggerHandler(ATMO_TRIGGER(less, conditionTrue), NULL);
ATMO_FreeValue(&value);
}
else
{
ATMO_Value_t value;
ATMO_InitValue(&value);
ATMO_TriggerHandler(ATMO_TRIGGER(less, conditionFalse), NULL);
ATMO_FreeValue(&value);
}
return ATMO_Status_Success;
}
ATMO_Status_t Red_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t Red_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
RGB_Led_Set_State(RGB_LED_BRIGHT_HIGH, RGB_LED_COLOR_BLACK);
return ATMO_Status_Success;
}
ATMO_Status_t Red_setColorPreset(ATMO_Value_t *in, ATMO_Value_t *out) {
unsigned int desiredColor = 0;
ATMO_GetUnsignedInt(in, &desiredColor);
uint8_t brightness = 0;
uint8_t color = 0;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(brightness, desiredColor);
return ATMO_Status_Success;
}
ATMO_Status_t Red_setBrightnessLow(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t brightness = 0;
uint8_t color = 0;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(RGB_LED_BRIGHT_LOW, color);
return ATMO_Status_Success;
}
ATMO_Status_t Red_setBrightnessOff(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t brightness = 0;
uint8_t color = 0;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(RGB_LED_BRIGHT_OFF, color);
return ATMO_Status_Success;
}
ATMO_Status_t Red_setBrightnessMedium(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t brightness = 0;
uint8_t color = 0;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(RGB_LED_BRIGHT_MEDIUM, color);
return ATMO_Status_Success;
}
ATMO_Status_t Red_setBrightnessHigh(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t brightness = 0;
uint8_t color = 0;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(RGB_LED_BRIGHT_HIGH, color);
return ATMO_Status_Success;
}
ATMO_Status_t Red_setRedOn(ATMO_Value_t *in, ATMO_Value_t *out) {
RGB_Led_Set_State(RGB_LED_BRIGHT_HIGH, RGB_LED_COLOR_RED);
return ATMO_Status_Success;
}
ATMO_Status_t Red_setGreenOn(ATMO_Value_t *in, ATMO_Value_t *out) {
RGB_Led_Set_State(RGB_LED_BRIGHT_HIGH, RGB_LED_COLOR_GREEN);
return ATMO_Status_Success;
}
ATMO_Status_t Red_setBlueOn(ATMO_Value_t *in, ATMO_Value_t *out) {
RGB_Led_Set_State(RGB_LED_BRIGHT_HIGH, RGB_LED_COLOR_BLUE);
return ATMO_Status_Success;
}
ATMO_Status_t Red_setWhiteOn(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t Red_toggleRed(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t color, brightness;
RGB_Led_Get_State(&brightness, &color);
if(brightness == RGB_LED_BRIGHT_OFF || color == RGB_LED_COLOR_BLACK)
{
brightness = RGB_LED_BRIGHT_HIGH;
}
else
{
brightness = RGB_LED_BRIGHT_OFF;
}
RGB_Led_Set_State(brightness, RGB_LED_COLOR_RED);
return ATMO_Status_Success;
}
ATMO_Status_t Red_toggleGreen(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t color, brightness;
RGB_Led_Get_State(&brightness, &color);
if(brightness == RGB_LED_BRIGHT_OFF || color == RGB_LED_COLOR_BLACK)
{
brightness = RGB_LED_BRIGHT_HIGH;
}
else
{
brightness = RGB_LED_BRIGHT_OFF;
}
RGB_Led_Set_State(brightness, RGB_LED_COLOR_GREEN);
return ATMO_Status_Success;
}
ATMO_Status_t Red_toggleBlue(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t color, brightness;
RGB_Led_Get_State(&brightness, &color);
if(brightness == RGB_LED_BRIGHT_OFF || color == RGB_LED_COLOR_BLACK)
{
brightness = RGB_LED_BRIGHT_HIGH;
}
else
{
brightness = RGB_LED_BRIGHT_OFF;
}
RGB_Led_Set_State(brightness, RGB_LED_COLOR_BLUE);
return ATMO_Status_Success;
}
ATMO_Status_t Red_setOff(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t color, brightness;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(brightness, RGB_LED_COLOR_BLACK);
return ATMO_Status_Success;
}
ATMO_Status_t Red_setColorHex(ATMO_Value_t *in, ATMO_Value_t *out) {
unsigned int color = 0;
ATMO_GetUnsignedInt(in, &color);
uint8_t red = (color >> 16) & 0xFF;
uint8_t green = (color >> 8) & 0xFF;
uint8_t blue = color & 0xFF;
Rgb_Led_Set_Colors(red, green, blue);
ATMO_CreateValueUnsignedInt(out, color);
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOn_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOn_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOn_beep(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_MK64F_Buzzer_On();
ATMO_PLATFORM_DelayMilliseconds(200);
ATMO_MK64F_Buzzer_Off();
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOn_turnOn(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_MK64F_Buzzer_On();
ATMO_CreateValueBool(out, true);
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOn_turnOff(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_MK64F_Buzzer_Off();
ATMO_CreateValueBool(out, false);
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOn_toggle(ATMO_Value_t *in, ATMO_Value_t *out) {
bool newState = false;
ATMO_MK64F_Buzzer_Toggle(&newState);
ATMO_CreateValueBool(out, newState);
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOn_setState(ATMO_Value_t *in, ATMO_Value_t *out) {
bool on = false;
ATMO_GetBool(in, &on);
if( on )
{
ATMO_MK64F_Buzzer_On();
}
else
{
ATMO_MK64F_Buzzer_Off();
}
ATMO_CreateValueBool(out, on);
return ATMO_Status_Success;
}
ATMO_Status_t Green_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t Green_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
RGB_Led_Set_State(RGB_LED_BRIGHT_HIGH, RGB_LED_COLOR_BLACK);
return ATMO_Status_Success;
}
ATMO_Status_t Green_setColorPreset(ATMO_Value_t *in, ATMO_Value_t *out) {
unsigned int desiredColor = 0;
ATMO_GetUnsignedInt(in, &desiredColor);
uint8_t brightness = 0;
uint8_t color = 0;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(brightness, desiredColor);
return ATMO_Status_Success;
}
ATMO_Status_t Green_setBrightnessLow(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t brightness = 0;
uint8_t color = 0;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(RGB_LED_BRIGHT_LOW, color);
return ATMO_Status_Success;
}
ATMO_Status_t Green_setBrightnessOff(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t brightness = 0;
uint8_t color = 0;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(RGB_LED_BRIGHT_OFF, color);
return ATMO_Status_Success;
}
ATMO_Status_t Green_setBrightnessMedium(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t brightness = 0;
uint8_t color = 0;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(RGB_LED_BRIGHT_MEDIUM, color);
return ATMO_Status_Success;
}
ATMO_Status_t Green_setBrightnessHigh(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t brightness = 0;
uint8_t color = 0;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(RGB_LED_BRIGHT_HIGH, color);
return ATMO_Status_Success;
}
ATMO_Status_t Green_setRedOn(ATMO_Value_t *in, ATMO_Value_t *out) {
RGB_Led_Set_State(RGB_LED_BRIGHT_HIGH, RGB_LED_COLOR_RED);
return ATMO_Status_Success;
}
ATMO_Status_t Green_setGreenOn(ATMO_Value_t *in, ATMO_Value_t *out) {
RGB_Led_Set_State(RGB_LED_BRIGHT_HIGH, RGB_LED_COLOR_GREEN);
return ATMO_Status_Success;
}
ATMO_Status_t Green_setBlueOn(ATMO_Value_t *in, ATMO_Value_t *out) {
RGB_Led_Set_State(RGB_LED_BRIGHT_HIGH, RGB_LED_COLOR_BLUE);
return ATMO_Status_Success;
}
ATMO_Status_t Green_setWhiteOn(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t Green_toggleRed(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t color, brightness;
RGB_Led_Get_State(&brightness, &color);
if(brightness == RGB_LED_BRIGHT_OFF || color == RGB_LED_COLOR_BLACK)
{
brightness = RGB_LED_BRIGHT_HIGH;
}
else
{
brightness = RGB_LED_BRIGHT_OFF;
}
RGB_Led_Set_State(brightness, RGB_LED_COLOR_RED);
return ATMO_Status_Success;
}
ATMO_Status_t Green_toggleGreen(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t color, brightness;
RGB_Led_Get_State(&brightness, &color);
if(brightness == RGB_LED_BRIGHT_OFF || color == RGB_LED_COLOR_BLACK)
{
brightness = RGB_LED_BRIGHT_HIGH;
}
else
{
brightness = RGB_LED_BRIGHT_OFF;
}
RGB_Led_Set_State(brightness, RGB_LED_COLOR_GREEN);
return ATMO_Status_Success;
}
ATMO_Status_t Green_toggleBlue(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t color, brightness;
RGB_Led_Get_State(&brightness, &color);
if(brightness == RGB_LED_BRIGHT_OFF || color == RGB_LED_COLOR_BLACK)
{
brightness = RGB_LED_BRIGHT_HIGH;
}
else
{
brightness = RGB_LED_BRIGHT_OFF;
}
RGB_Led_Set_State(brightness, RGB_LED_COLOR_BLUE);
return ATMO_Status_Success;
}
ATMO_Status_t Green_setOff(ATMO_Value_t *in, ATMO_Value_t *out) {
uint8_t color, brightness;
RGB_Led_Get_State(&brightness, &color);
RGB_Led_Set_State(brightness, RGB_LED_COLOR_BLACK);
return ATMO_Status_Success;
}
ATMO_Status_t Green_setColorHex(ATMO_Value_t *in, ATMO_Value_t *out) {
unsigned int color = 0;
ATMO_GetUnsignedInt(in, &color);
uint8_t red = (color >> 16) & 0xFF;
uint8_t green = (color >> 8) & 0xFF;
uint8_t blue = color & 0xFF;
Rgb_Led_Set_Colors(red, green, blue);
ATMO_CreateValueUnsignedInt(out, color);
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOff_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOff_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOff_beep(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_MK64F_Buzzer_On();
ATMO_PLATFORM_DelayMilliseconds(200);
ATMO_MK64F_Buzzer_Off();
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOff_turnOn(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_MK64F_Buzzer_On();
ATMO_CreateValueBool(out, true);
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOff_turnOff(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_MK64F_Buzzer_Off();
ATMO_CreateValueBool(out, false);
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOff_toggle(ATMO_Value_t *in, ATMO_Value_t *out) {
bool newState = false;
ATMO_MK64F_Buzzer_Toggle(&newState);
ATMO_CreateValueBool(out, newState);
return ATMO_Status_Success;
}
ATMO_Status_t BuzzOff_setState(ATMO_Value_t *in, ATMO_Value_t *out) {
bool on = false;
ATMO_GetBool(in, &on);
if( on )
{
ATMO_MK64F_Buzzer_On();
}
else
{
ATMO_MK64F_Buzzer_Off();
}
ATMO_CreateValueBool(out, on);
return ATMO_Status_Success;
}
ATMO_Status_t SX9500Touch_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t SX9500Touch_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_SX9500_Config_t config;
config.address = ATMO_PROPERTY(SX9500Touch, i2cAddress);
config.i2cDriverInstance = ATMO_PROPERTY(SX9500Touch, i2cInstance);
config.gpioDriverInstance = ATMO_PROPERTY(SX9500Touch, gpioInstance);
config.interruptEnabled = ATMO_PROPERTY(SX9500Touch, interruptEnabled);
config.interruptPin = ATMO_PROPERTY(SX9500Touch, interruptGpio);
ATMO_SX9500_Init(&config);
ATMO_SX9500_RegisterTouchedAbilityHandle(SX9500_Touched_Up, ATMO_ABILITY(SX9500Touch, pressUp));
ATMO_SX9500_RegisterTouchedAbilityHandle(SX9500_Touched_Down, ATMO_ABILITY(SX9500Touch, pressDown));
ATMO_SX9500_RegisterTouchedAbilityHandle(SX9500_Touched_Left, ATMO_ABILITY(SX9500Touch, pressLeft));
ATMO_SX9500_RegisterTouchedAbilityHandle(SX9500_Touched_Right, ATMO_ABILITY(SX9500Touch, pressRight));
return ATMO_Status_Success;
}
ATMO_Status_t SX9500Touch_getTouchData(ATMO_Value_t *in, ATMO_Value_t *out) {
return;
}
ATMO_Status_t SX9500Touch_pressUp(ATMO_Value_t *in, ATMO_Value_t *out) {
SX9500_TouchState_t touchState;
ATMO_GetBinary(in, &touchState, sizeof(touchState));
ATMO_CreateValueBinary(out, &touchState, sizeof(touchState));
return ATMO_Status_Success;
}
ATMO_Status_t SX9500Touch_pressDown(ATMO_Value_t *in, ATMO_Value_t *out) {
SX9500_TouchState_t touchState;
ATMO_GetBinary(in, &touchState, sizeof(touchState));
ATMO_CreateValueBinary(out, &touchState, sizeof(touchState));
return ATMO_Status_Success;
}
ATMO_Status_t SX9500Touch_pressLeft(ATMO_Value_t *in, ATMO_Value_t *out) {
SX9500_TouchState_t touchState;
ATMO_GetBinary(in, &touchState, sizeof(touchState));
ATMO_CreateValueBinary(out, &touchState, sizeof(touchState));
return ATMO_Status_Success;
}
ATMO_Status_t SX9500Touch_pressRight(ATMO_Value_t *in, ATMO_Value_t *out) {
SX9500_TouchState_t touchState;
ATMO_GetBinary(in, &touchState, sizeof(touchState));
ATMO_CreateValueBinary(out, &touchState, sizeof(touchState));
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedNxpRpkUserButtons_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedNxpRpkUserButtons_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_MK64F_GPIO_EnableResetCombo(ATMO_PROPERTY(EmbeddedNxpRpkUserButtons, enableResetCombo));
ATMO_MK64F_GPIO_EnableDisplayToggleCombo(ATMO_PROPERTY(EmbeddedNxpRpkUserButtons, enableDisplayToggleCombo));
ATMO_MK64F_UserButton_RegisterAbilityHandle(ATMO_MK64F_SW1_Pushed, ATMO_ABILITY(EmbeddedNxpRpkUserButtons, topRightPushed));
ATMO_MK64F_UserButton_RegisterAbilityHandle(ATMO_MK64F_SW2_Pushed, ATMO_ABILITY(EmbeddedNxpRpkUserButtons, bottomRightPushed));
ATMO_MK64F_UserButton_RegisterAbilityHandle(ATMO_MK64F_SW3_Pushed, ATMO_ABILITY(EmbeddedNxpRpkUserButtons, topLeftPushed));
ATMO_MK64F_UserButton_RegisterAbilityHandle(ATMO_MK64F_SW4_Pushed, ATMO_ABILITY(EmbeddedNxpRpkUserButtons, bottomLeftPushed));
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedNxpRpkUserButtons_topRightPushed(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedNxpRpkUserButtons_bottomRightPushed(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedNxpRpkUserButtons_topLeftPushed(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedNxpRpkUserButtons_bottomLeftPushed(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedPageController_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedPageController_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_PAGE_CONTROLLER_Config_t config;
config.enableUpDownNavLabels = ATMO_PROPERTY(EmbeddedPageController, upDownNavigationLabelsEnabled);
config.enableLeftRightNavLabels = ATMO_PROPERTY(EmbeddedPageController, leftRightNavigationLabelsEnabled);
ATMO_UI_Page_SetConfiguration(&config);
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedPageController_displayRootPage(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_Page_DisplayRootPage();
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedPageController_navigateUp(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_Page_ProcessNavButton(ATMO_UI_PAGE_NAV_UP);
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedPageController_navigateDown(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_Page_ProcessNavButton(ATMO_UI_PAGE_NAV_DOWN);
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedPageController_navigateLeft(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_Page_ProcessNavButton(ATMO_UI_PAGE_NAV_LEFT);
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedPageController_navigateRight(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_Page_ProcessNavButton(ATMO_UI_PAGE_NAV_RIGHT);
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedPageController_processTopRightButton(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_Page_ProcessUserButton(1);
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedPageController_processBottomRightButton(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_Page_ProcessUserButton(2);
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedPageController_processTopLeftButton(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_Page_ProcessUserButton(3);
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedPageController_processBottomLeftButton(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_Page_ProcessUserButton(4);
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedSystemStatusDisplay_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedSystemStatusDisplay_displayPage(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_Page_DisplayPageByCoord(ATMO_PROPERTY(EmbeddedSystemStatusDisplay, x), ATMO_PROPERTY(EmbeddedSystemStatusDisplay, y), false);
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedSystemStatusDisplay_onDisplayed(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedSystemStatusDisplay_setup(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_PAGE_Config_t config;
config.hidden = ATMO_PROPERTY(EmbeddedSystemStatusDisplay, pageHidden);
config.activeButtons = ATMO_UI_Page_GetButtonMask(ATMO_PROPERTY(EmbeddedSystemStatusDisplay, topRightButtonEnabled),
ATMO_PROPERTY(EmbeddedSystemStatusDisplay,bottomRightButtonEnabled), ATMO_PROPERTY(EmbeddedSystemStatusDisplay, topLeftButtonEnabled), ATMO_PROPERTY(EmbeddedSystemStatusDisplay, bottomLeftButtonEnabled));
config.x = ATMO_PROPERTY(EmbeddedSystemStatusDisplay, x);
config.y = ATMO_PROPERTY(EmbeddedSystemStatusDisplay, y);
strncpy(config.topLeftButtonLabel, ATMO_PROPERTY(EmbeddedSystemStatusDisplay, topLeftButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);
strncpy(config.topRightButtonLabel, ATMO_PROPERTY(EmbeddedSystemStatusDisplay, topRightButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);
strncpy(config.bottomLeftButtonLabel, ATMO_PROPERTY(EmbeddedSystemStatusDisplay, bottomLeftButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);
strncpy(config.bottomRightButtonLabel, ATMO_PROPERTY(EmbeddedSystemStatusDisplay, bottomRightButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);
config.spanX = ATMO_PROPERTY(EmbeddedSystemStatusDisplay, spanX);
config.spanY = ATMO_PROPERTY(EmbeddedSystemStatusDisplay, spanY);
config.title = ATMO_PROPERTY(EmbeddedSystemStatusDisplay, pageTitle);
config.titleHidden = ATMO_PROPERTY(EmbeddedSystemStatusDisplay, titleHidden);
ATMO_UI_SYSTEMSTATUS_Init(&config);
}
ATMO_Status_t EmbeddedIconLabelDisplay_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedIconLabelDisplay_displayPage(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_UI_Page_DisplayPageByCoord(ATMO_PROPERTY(EmbeddedIconLabelDisplay, x), ATMO_PROPERTY(EmbeddedIconLabelDisplay, y), false);
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedIconLabelDisplay_onDisplayed(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedIconLabelDisplay_topRightButtonPressed(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedIconLabelDisplay_bottomRightButtonPressed(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
}
ATMO_Status_t EmbeddedIconLabelDisplay_topLeftButtonPressed(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_Status_Success;
...
This file has been truncated, please download it to see its full contents.
Comments