Skip to content

Instantly share code, notes, and snippets.

#include "glcd.h"
void main()
{
GLCD_Init();
GLCD_HorizontalGraph(0,45);
GLCD_HorizontalGraph(1,50);
GLCD_HorizontalGraph(2,82);
GLCD_HorizontalGraph(3,74);
#include<pic16f877a.h>
void delay(int cnt) {
while (cnt--);
}
int main() {
char dutyCycle = 0;
TRISC = 0x00; // Configure PORTC as output(RC2-PWM1, RC1-PWM2)
#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
#include <lpc17xx.h>
#include "sdcard.h"
#include "uart.h"
#include "fat32.h"
#include "stdutils.h"
#include "delay.h"
#include "spi.h"
int main()
{
/*
* 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 <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<reg51.h>
sbit LED = P0^0;
void timer0_isr() interrupt 1
{
LED =! LED; // Toggle the LED pin,
//Note Timer value is not reloaded, It is automatically taken care
}
void main()
/* Configure the data bus and Control pins as per the hardware connection
Databus is connected to P2_0:P2_7 and control bus P0_0:P0_2*/
#define LcdDataBus P2
sbit LCD_RS = P0^0;
sbit LCD_RW = P0^1;
sbit LCD_EN = P0^2;
void EEPROM_WriteByte(unsigned char eepromAddress, unsigned char eepromData)
{
unsigned char gie_Status;
while(WR); // check the WR bit to see if a previous Write operation is in progress
EEADR=eepromAddress; // Write the address to EEADR.
EEDATA=eepromData; // load the 8-bit data value to be written in the EEDATA register.
WREN=1; // Set the WREN bit to enable eeprom operation.
gie_Status = GIE; // Copy the current Interrupt state
GIE = 0; // Disable the interrupts
unsigned char EEPROM_ReadByte(unsigned char eepromAddress)
{
while(RD || WR); // check the WR&RD bit to see if a RD/WR is in progress
EEADR=eepromAddress; // Write the address to EEADR.
RD = 1; // Set the RD bit to trigger the eeprom read operation.
return(EEDATA); // Return the data read form eeprom.
}