Skip to content

Instantly share code, notes, and snippets.

View winhtut's full-sized avatar
🎯
Focusing

WinHtut winhtut

🎯
Focusing
View GitHub Profile
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
void setup() {
lcd.begin(16,2);
Serial.begin(9600);
@winhtut
winhtut / lottery game version1
Last active May 13, 2018 19:04
Lottery Game<beginner>
#include<stdio.h>
#include<conio.h>
int money1(int x);
int main() {
int password, money;
int x;
printf_s("Welcome to our lottery game:\n Please enter your passcode:");
@winhtut
winhtut / random
Created February 9, 2018 17:58
lesson 23
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int main() {
int frequency1 = 0;
int frequency2 = 0;
int frequency3 = 0;
int frequency4 = 0;
int frequency5 = 0;
@winhtut
winhtut / 13 searching.cpp
Last active January 2, 2020 06:54
Lesson 10 Array
#include<iostream>
using namespace std;
int main(){
int data[100]={0};
int number=0;
cout<<"Please enter numbers (1-100)"<<endl;
cin>>number;
for ( int i=0; i<number ; i++){
@winhtut
winhtut / Irremote.h
Created May 9, 2018 12:07
imitat code
#include <IRremote.h>
IRsend irsend;
void setup() {
Serial.begin(9600);
}
void loop() {
@winhtut
winhtut / BlinkingLED.jad
Created May 30, 2018 12:48
Led On and Off with java
MIDlet-Name: BlinkingLED
MIDlet-Version: 1.0
MIDlet-Vendor: PiJava Tutorials
MIDlet-1: BlinkingLED,,BlinkingLED
MIDlet-Jar-Size:
MIDlet-Jar-URL: BlinkingLED.jar
#include <RFID.h>
/*
* Read a card using a mfrc522 reader on your SPI interface
* Pin layout should be as follows (on Arduino Uno):
* MOSI: Pin 11 / ICSP-4
* MISO: Pin 12 / ICSP-1
* SCK: Pin 13 / ISCP-3
* SS/SDA: Pin 10
* RST: Pin 9
@winhtut
winhtut / Traffic Light Version 1
Created June 16, 2018 14:45
Traffic Light Version 1
void setup() {
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
void setup() {
Serial.begin(9600);
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
Serial.println("Serial is Ready to use:");
}
void loop() {
const int trigPin = 9;
const int echoPin = 10;
long duration;
int distance;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
}