Skip to content

Instantly share code, notes, and snippets.

View urmil0071's full-sized avatar

urmil urmil0071

View GitHub Profile
@urmil0071
urmil0071 / Hex Number Multiplication
Last active August 16, 2017 19:34
Hex Number Multiplication
#include <Arduino.h>
byte x=0;
char lupTable[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
char display[]={B111110,B111101,B111011,B110111};
int x1,x2,z1,z2,z3,z4,y,y1,y2,y3,y4;
int shift[]={12,8,4,0};
int digit[4];
int ccCode[4];
void setup()
{
@urmil0071
urmil0071 / 0 to 99 Counter Using Arduino and cc Type 7 Segment Display
Created August 16, 2017 19:38
0 to 99 Counter Using Arduino and cc Type 7 Segment Display
#include <Arduino.h>
char lut[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
int disp[]={B111110,B111101};
byte d;
byte x=0;
byte x1,x2,xx;
void setup()
{
DDRB=0xFF;
DDRD=0xFF;
@urmil0071
urmil0071 / 0 to 99 Counter Using Arduino and cc Type 7 Segment Display (Interrupt Method)
Last active August 17, 2017 05:30
0 to 99 Counter Using Arduino and cc Type 7 Segment Display
#include <Arduino.h>
byte lut[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
byte disp[]={B111110,B111101};
byte d=0;
byte x=0;
byte x1,x2,xx;
void setup()
{
DDRB=0xFF;
DDRD=0xFF;
@urmil0071
urmil0071 / simple c++ calculator with Switch statements
Created August 16, 2017 19:41
simple c++ calculator with Switch statements
#include <iostream>
using namespace std;
void main()
{
int a,b;
char c;
cout << "enter the two numbers to calculate" << endl; cin>>a>>b;
cout << " Press the desired operator , + for addition, - for substraction, * for multiplication, / for division " << endl; cin>>c;
@urmil0071
urmil0071 / Add 0x24 and 0x56 and show it on LCD without using lcd.print() or lcd.write()
Created August 17, 2017 07:36
Add 0x24 and 0x56 and show it on LCD without using lcd.print() or lcd.write()
#include <Arduino.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
void setup()
{
lcd.begin(16,2);
lcd.clear();
lcd.setCursor(0,0);
byte x1=0x24;
byte x2=0x56;
@urmil0071
urmil0071 / (INCOMPLETE)(MINIMAL INSTRUCTIONS) Add 0x24 and 0x56 and show it on LCD without using lcd.print() or lcd.write()
Last active August 17, 2017 12:47
(INCOMPLETE)(MINIMAL INSTRUCTIONS) Add 0x24 and 0x56 and show it on LCD without using lcd.print() or lcd.write()
#include <Arduino.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
void setup()
{
lcd.begin(16,2);
lcd.clear();
lcd.setCursor(0,0);
byte x1=0x24;
byte x2=0x56;
@urmil0071
urmil0071 / Write program to add BCD 67 and 25 and show result (92) at DP0,DP1 of Line-1 of LCD
Last active August 17, 2017 12:45
Write program to add BCD 67 and 25 and show result (92) at DP0,DP1 of Line-1 of LCD
#include <Arduino.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
void setup()
{
byte x1=0x67;
byte x2=0x25;
@urmil0071
urmil0071 / (INCOMPLETE) Standard C++ Codes for Data Exchange between Arduino UART and PC (Polling Method)
Created August 17, 2017 12:40
(INCOMPLETE) Standard C++ Codes for Data Exchange between Arduino UART and PC (Polling Method)
#include <Arduino.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
void setup()
{
lcd.begin(16,2);
lcd.clear();
lcd.setCursor(5,0);
pinMode(13,OUTPUT);
@urmil0071
urmil0071 / Operate CLKTC0 Counter0 to count external rising edges from T1pin(DPIN 11)
Created August 17, 2017 17:27
Operate CLKTC0 Counter0 to count external rising edges from T1pin(DPIN 11)
#include <Arduino.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
void setup()
{
int secPassed=0;
pinMode(11,INPUT);
TCCR0B=0x00; /// TC0 Stop
@urmil0071
urmil0071 / Execute ISR to blink LED 3 times using TC1 interrupt (MLP=Do Nothing) (ISR=Blink Built In LED 3 times after 1 second interval)
Created August 17, 2017 18:47
Execute ISR to blink LED 3 times using TC1 interrupt (MLP=Do Nothing) (ISR=Blink Built In LED 3 times after 1 second interval)