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 <Wire.h> | |
#include <VL53L0X.h> | |
#define RSensorPin 52 | |
#define LSensorPin 50 | |
VL53L0X RSensor; // Right Sensor | |
VL53L0X LSensor; // Left Sensor | |
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
// GPIO | |
int *PORTA = 0xF80; | |
int *PORTB = 0xF81; | |
int *PORTC = 0xF82; | |
int *PORTD = 0xF83; | |
int *LATA = 0xF89; | |
int *LATB = 0xF8A; | |
int *LATC = 0xF8B; | |
int *LATD = 0xF8C; |
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 <18f4520.h> | |
#use delay (clock = 20000000) | |
#fuses HS, NOWDT, NOLVP | |
#include "..\Library\18f4520Reg.h" | |
#include "..\Library\modifiedlcd.h" | |
#INT_RDA | |
void int_rda_isr(){ | |
if(*RCREG>0){ | |
*CCPR2 = *RCREG; |
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 <18f4520.h> | |
#use delay (clock = 20000000) | |
#fuses HS, NOWDT, NOLVP | |
#include "..\Library\18f4520Reg.h" | |
#include "..\Library\modifiedlcd.h" | |
#include "..\Library\keyPad.h" | |
#INT_RDA | |
void int_rda_isr(){ | |
printf(lcd_putc,"\f %luHz",(long)((*RCREG)+1000)); |
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 <conio.h> | |
#define SET 1 | |
#define RESET 2 | |
#define TOGGLE 3 | |
#define READ 4 | |
#define QUIT 0 | |
void binaryPrint(int x); | |
int setBit(int number, int loc); |
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 <conio.h> | |
main(){ | |
int x = -345; | |
float y = 3.123456789; | |
char z = 'A'; | |
printf("x is %d \n y %.6f \n z is %c", x ,y, z); | |
while(!kbhit()); | |
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 <conio.h> | |
main(){ | |
printf(" Hello World "); | |
while(1); | |
} |
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 <conio.h> | |
void fibonacci(int *array, int limit); | |
main(){ | |
int x=0, myArray[100], seed1, seed2, limit; | |
printf(" Please enter two seeds and limit: "); | |
scanf(" %d %d %d", &myArray[0], &myArray[1], &limit); | |
fibonacci(myArray, limit); |
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 <conio.h> | |
main(){ | |
int input, x=1; | |
printf("Enter and integer: "); | |
scanf(" %d", &input); | |
while( input > 1){ | |
input = input / 10; | |
x++; | |
} |
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 <conio.h> | |
main(){ | |
int x, sum=0; | |
for(x=0;x<10;x++){ | |
printf("\n %d Please enter a number: ", x); | |
scanf(" %d", &x); | |
sum = sum + x; | |
} | |
printf("The overall sum is %d", sum); |
NewerOlder