Skip to content

Instantly share code, notes, and snippets.

@AungWinnHtut
AungWinnHtut / bluetoothcarAWH.ino
Created March 10, 2019 11:34
/* This program is to communicate with bluetooth and android mobile phone by Dr. Aung Win Htut */
/*
This program is to communicate with bluetooth
and android mobile phone
by Dr. Aung Win Htut
*/
#include <SoftwareSerial.h>
SoftwareSerial mySerial(9, 10); // RX, TX
int in1=2; //Arduino pin 2 connected to L298 pin in1
@AungWinnHtut
AungWinnHtut / Binary Search Tree.cpp
Created February 18, 2019 05:14 — forked from harish-r/Binary Search Tree.cpp
Binary Search Tree Implementation in C++
#include<iostream>
using namespace std;
class BST
{
struct node
{
int data;
node* left;
@AungWinnHtut
AungWinnHtut / BST_InorderSuccessor_CPP.cpp
Created February 18, 2019 05:13 — forked from mycodeschool/BST_InorderSuccessor_CPP.cpp
C++ program to find Inorder successor in a BST
/* C++ program to find Inorder successor in a BST */
#include<iostream>
using namespace std;
struct Node {
int data;
struct Node *left;
struct Node *right;
};
//Function to find some data in the tree
@AungWinnHtut
AungWinnHtut / HX711.ino
Created February 12, 2019 10:28
HX711.ino scale for ko yar zar min
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
#include "HX711.h"
#define calibration_factor -669.10
#define DOUT 3
#define CLK 2
HX711 scale(DOUT, CLK);
char * floatToString(char * outstr, float value, int places);
void setup() {
@AungWinnHtut
AungWinnHtut / autorefresh.php
Created February 3, 2019 14:38
autorefresh web page
<head> <meta http-equiv="refresh" content="30" /> </head>
Auto Refresh Webpage with PHP, HTML and JavaScript
I’m developing server checking & monitoring webpage. I would left the page open all the time on my browser. So it will be good to that page auto refresh every certain amount of time so I don’t have to keep hitting F5 manually to refresh.
There are a few option that I have, I can do it either by using PHP Code, HTML Meta tag or JavaScript.
For example I want to refresh the webpage every 10 seconds. The are the code.
PHP Code
***********************************
@AungWinnHtut
AungWinnHtut / Time.cpp
Created February 3, 2019 11:00
time cpp
#include "Time.h"
#include<iostream>
#include<string>
void Time::Clear() {
hour = 0;
minute = 0;
}
Time::Time() {
@AungWinnHtut
AungWinnHtut / hello.cpp
Created January 19, 2019 14:35
first cpp program
#include<iostream>
#include<conio.h>
using namespace std;
int funArea();
int main()
{
float gold_weight_in_kyat, kyat, pae, yway, total_gold_price,one_kyat_price;
cout<<"pls enter one kyat price ";
@AungWinnHtut
AungWinnHtut / GreenHackersArduinoBaydin.ino
Created December 10, 2018 09:20
Program 2018121002GreenHackersArduinoBaydin.ino
//Program 2018121002GreenHackersArduinoBaydin.ino
//Programmer Dr. Aung Win Htut
//Date: 20181210:1538
int iAns = 0;
void setup() {
Serial.begin(9600);
Serial.println("Green Hackers Arduino Baydin");
Serial.println("****************************");
Serial.println("Please Type Your Name in Serial Monitor!");
/**
* Displays text sent over the serial port (e.g. from the Serial Monitor) on
* an attached LCD.
*/
//This program is originally an example program for LiquidCrystal_I2C.h
//This program is modified by Dr. Aung Win Htut
//This program read from serial and print on lcd
//we modified it to move next line if char reach col 16
#include <Wire.h>
///////////////////
int getID() {
// Getting ready for Reading PICCs
if ( ! mfrc522.PICC_IsNewCardPresent()) { //If a new PICC placed to RFID reader continue
return 0;
}
if ( ! mfrc522.PICC_ReadCardSerial()) { //Since a PICC placed get Serial and continue
return 0;
}
// There are Mifare PICCs which have 4 byte or 7 byte UID care if you use 7 byte PICC