This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "glcd.h" | |
void main() | |
{ | |
GLCD_Init(); | |
GLCD_HorizontalGraph(0,45); | |
GLCD_HorizontalGraph(1,50); | |
GLCD_HorizontalGraph(2,82); | |
GLCD_HorizontalGraph(3,74); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<pic16f877a.h> | |
void delay(int cnt) { | |
while (cnt--); | |
} | |
int main() { | |
char dutyCycle = 0; | |
TRISC = 0x00; // Configure PORTC as output(RC2-PWM1, RC1-PWM2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <lpc17xx.h> | |
#include "sdcard.h" | |
#include "uart.h" | |
#include "fat32.h" | |
#include "stdutils.h" | |
#include "delay.h" | |
#include "spi.h" | |
int main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
} |
NewerOlder