Skip to content

Instantly share code, notes, and snippets.

/*
ADXL335
note:vcc-->5v ,but ADXL335 Vs is 3.3V
The circuit:
5V: VCC
analog 1: x-axis
analog 2: y-axis
analog 3: z-axis
*/
const int xpin = 1; // x-axis of the accelerometer
@AungWinnHtut
AungWinnHtut / savefile.cs
Created April 21, 2018 08:29
savefile.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
@AungWinnHtut
AungWinnHtut / frmGraphics.cs
Created April 15, 2018 14:51
This program is to teach basic graphics for beginners
// frmGraphics.cs
// This program is to teach basic graphics for beginners
// need to add btnDraw and Timer1
// programmer: Dr. Aung Win Htut (Green Hackers)
// https://www.facebook.com/GreenHackersOTC
///////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
//https://www.c-sharpcorner.com/article/gdi-tutorial-for-beginners/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
@AungWinnHtut
AungWinnHtut / lookupTable.c
Created April 13, 2018 10:57
This program is to teach beginner to understand 1-lookup talbe 2-external variable 3-array 4-structure 5-return datatype
/*
This program is to teach beginner
to understand
1-lookup talbe
2-external variable
3-array
4-structure
5-return datatype
@AungWinnHtut
AungWinnHtut / drawLine.c
Created April 13, 2018 10:48
This program is to teach beginner to understand absolute coordinate, relative coordinate and to show how to draw a line and mirrow a line to teach usage of static variable
/*
This program is to teach beginner
to understand absolute coordinate,
relative coordinate
and to show how to draw a line and mirrow a line
to teach usage of static variable
Programmer: Dr. Aung Win Htut (Green Hackers)
https://www.facebook.com/GreenHackersOTC/
@AungWinnHtut
AungWinnHtut / 2018041101gotoxyPoint.c
Created April 11, 2018 09:04
This program is to draw a point with printf and for loops
/*
This program is to draw a point with printf and for loops
to train for looping especially
for two days beginner in C
Programmer: Dr. Aung Win Htut (Green Hackers)
https://www.facebook.com/GreenHackersOTC/
Date: 10-04-2018
*/
#include<stdio.h>
/*
This program is to draw a rectangle with printf and for loops
to train for looping especially
for two days beginner in C
Programmer: Dr. Aung Win Htut (Green Hackers)
https://www.facebook.com/GreenHackersOTC/
Date: 10-04-2018
*/
@AungWinnHtut
AungWinnHtut / 2018041001DrawRectangle.c
Created April 10, 2018 04:58
This program is to draw a rectangle with printf and for loops to train looping and coordinate calculation for two days beginner in C
/*
This program is to draw a rectangle with printf and for loops
to train looping and coordinate calculation
for two days beginner in C
Programmer: Dr. Aung Win Htut (Green Hackers)
https://www.facebook.com/GreenHackersOTC/
Date: 10-04-2018
*/
//These functios will help you when you need old delay() and clrscr() functions from Turbo C
//Anyone can use this code freely
//The original coder of delay function is https://stackoverflow.com/users/5148111/rizwan-raza
//I found at https://stackoverflow.com/questions/27447195/how-to-use-delay-function-in-c-using-codeblocks-13-12mingw
//Modified and matained by Green Hackers
//We will add more code here
#include<process.h>
#include<time.h>
void delay(unsigned int miliS)