This file contains hidden or 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 <SPI.h> | |
#include <SD.h> | |
#include <SparkFunDS1307RTC.h> | |
#include <Wire.h> | |
#include "max6675.h" | |
int ktcSO = 8; | |
int ktcCS = 9; | |
int ktcCLK = 10; | |
const int chipSelect = 4; |
This file contains hidden or 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
/* | |
* | |
* Blynk app controlled Robot with Horbill ESP32. | |
* For more details visit: | |
* https://exploreembedded.com/wiki/Robo_with_Hornbill_ESP32 | |
* | |
* | |
*/ | |
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space |
This file contains hidden or 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 "lcd.h" | |
/* | |
* | |
*/ | |
int main() | |
{ | |
/*Connect RS->P0.0, RW->P0.1, EN->P0.2 and data bus to P0.4 to P0.7*/ | |
LCD_SetUp(P0_0,P0_1,P0_2,P_NC,P_NC,P_NC,P_NC,P0_4,P0_5,P0_6,P0_7); | |
LCD_Init(1,16); |
This file contains hidden or 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 "lcd.h" | |
/* | |
* | |
*/ | |
int main() | |
{ | |
/*Connect RS->P0.0, RW->P0.1, EN->P0.2 and data bus to P0.4 to P0.7*/ | |
LCD_SetUp(P0_0,P0_1,P0_2,P_NC,P_NC,P_NC,P_NC,P0_4,P0_5,P0_6,P0_7); | |
LCD_Init(4,20); |
This file contains hidden or 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 "lcd.h" | |
/* | |
* | |
*/ | |
int main() | |
{ | |
/*Connect RS->P0.0, RW->P0.1, EN->P0.2 and data bus to P0.4 to P0.7*/ | |
LCD_SetUp(P0_0,P0_1,P0_2,P_NC,P_NC,P_NC,P_NC,P0_4,P0_5,P0_6,P0_7); |
This file contains hidden or 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 = P3^7; // LED is connected to P3.7 | |
sbit Switch = P3^3; // Switch is connected to P3.3 | |
int main() | |
{ | |
P3 = 0x08; // Switch declared as input and LED as output |
This file contains hidden or 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> | |
#define LED P3 // LED's are connected to higher bits of P3 | |
void DELAY_ms(unsigned int ms_Count) | |
{ | |
unsigned int i,j; | |
for(i=0;i<ms_Count;i++) | |
{ |
This file contains hidden or 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 <avr/io.h> | |
#define FOSC 16000000// Clock Speed | |
#define BAUD 9600 | |
#define MYUBRR FOSC/16/BAUD-1 | |
void USART_Init( unsigned int ubrr ); | |
void USART_Transmit( unsigned char data ); | |
unsigned char USART_Receive( void ); |
This file contains hidden or 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 USART_Receive( void ) | |
{ | |
/* Wait for data to be received */ | |
while ( !(UCSR0A & (1<<RXC)) ) | |
; | |
/* Get and return received data from buffer */ | |
return UDR0; | |
} |
This file contains hidden or 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 USART_Transmit( unsigned char data ) | |
{ | |
/* Wait for empty transmit buffer */ | |
while ( !( UCSR0A & (1<<UDRE)) ) | |
; | |
/* Put data into buffer, sends the data */ | |
UDR0 = data; | |
} |
NewerOlder