Skip to content

Instantly share code, notes, and snippets.

/**************************************************************************//**
* @file system_LPC17xx.c
* @brief CMSIS Cortex-M3 Device Peripheral Access Layer Source File
* for the NXP LPC17xx Device Series
* @version V1.03
* @date 07. October 2009
*
* @note
* Copyright (C) 2009 ARM Limited. All rights reserved.
*
#include <lpc17xx.h>
#include "sdcard.h"
#include "uart.h"
#include "fat32.h"
#include "stdutils.h"
#include "delay.h"
#include "spi.h"
int main()
{
/*
* Hornbill Industrial Data logger (Temp and Current )
*
* Reference links:
https://exploreembedded.com/wiki/Secure_IOT_with_AWS_and_Hornbill_ESP32
https://exploreembedded.com/wiki/AWS_IOT_with_Arduino_ESP32
* Library Links:
/*
* Tutorial : Hornbill Industrial Data logger (Temp and Current )
* Sensor: Max6675 Temp Sensor, non-invasive Current Sensor sensor
* Reference links:
https://exploreembedded.com/wiki/Hornbill_Industrial_Data_Logger
https://exploreembedded.com/wiki/Secure_IOT_with_AWS_and_Hornbill_ESP32
https://exploreembedded.com/wiki/AWS_IOT_with_Arduino_ESP32
* Library Links:
#include <AWS_IOT.h>
#include <WiFi.h>
#include <Hornbill_IO.h>
AWS_IOT AWS_CLIENT;
char WIFI_SSID[]="your Wifi SSID";
char WIFI_PASSWORD[]="Wifi Password";
char HOST_ADDRESS[]="AWS host address";
char CLIENT_ID[]= "client id";
typedef struct {
float value; // digital/analog value of the pin
int pin; // Pin Num to read/write the data
char operation[20]; // IO opeartion (digitalRead/digitalWrite/analogRead)
}hornbill_IO_type_t;
{
"reported":{
"operation":"analogRead",
"pin":36,
"value":1023.00
}
}
{
"desired":{
"operation":"digitalWrite",
"pin":13,
"value":1
}
}
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <unistd.h>
#include <limits.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include <AWS_IOT.h>
#include <WiFi.h>
#include "DHT.h"
#define DHTPIN 4 // what digital pin we're connected to
// Uncomment whatever type you're using!
#define DHTTYPE DHT11 // DHT 11