Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ipst.h>
- int r=0,h=0;
- float a=1.732,eqa;
- void setup(){
- setTextColor(GLCD_SKY);
- glcdMode(1);
- }
- void loop(){
- h=map(analog(0),0,1023,0,10);
- r=map(analog(1),0,1023,0,10);
- glcd(0,2,"Sk1 Mathematics Project");
- setTextColor(GLCD_WHITE);
- glcd(2,1,"(%d * %d )" , h, r);
- setTextColor(GLCD_ORANGE);
- glcd(6,0,"........Answer is........");
- sleep(10);
- eqa = a*(h*r);
- setTextColor(GLCD_GREEN);
- glcd(9,1,"%F",eqa);
- setTextColor(GLCD_RED);
- glcd(12,22,"Ans");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement