loading
1Instructables10,974Views14CommentsJoined December 29th, 2015

Tell us about yourself!

Complete Your Profile

Achievements

10K+ Views Earned a bronze medal
  • abhra0897 commented on Ana CarolinaB2's instructable Breathalyzer in Arduino5 months ago
    Breathalyzer in Arduino

    I debugged the code and converted it into English. You may try it. (Working code)....#include "U8glib.h"U8GLIB_ST7920_128X64_1X u8g(5, 4, 3 ,6);#define qtdLED 6int LEDs[qtdLED];int count;int value_sensor = 0;unsigned long time;int maxTime = 300;int status = 1;String state;int position1;int i;int j;int maximumReading;void draw(){u8g.setFont(u8g_font_8x13B);u8g.drawRFrame(0, 20, 128, 44, 4);u8g.drawStr( 30, 10, "BREATHALYZER");u8g.setFont(u8g_font_robot_de_niro);u8g.drawStr( 8, 20, "Careful You can be arrested");u8g.setFont(u8g_font_8x13B);u8g.drawStr( 10, 37, "Wait");if (status == 1){u8g.drawBox(80, 25, 20, 30);u8g.drawHLine(77, 24, 26);u8g.drawRFrame(78, 25 , 24, 32, 0);u8g.drawRFrame(77, 25 , 26, 32, 0);u8g.drawHLine(76, 57, 28);u8g.drawHLine(76,...see more »I debugged the code and converted it into English. You may try it. (Working code)....#include "U8glib.h"U8GLIB_ST7920_128X64_1X u8g(5, 4, 3 ,6);#define qtdLED 6int LEDs[qtdLED];int count;int value_sensor = 0;unsigned long time;int maxTime = 300;int status = 1;String state;int position1;int i;int j;int maximumReading;void draw(){u8g.setFont(u8g_font_8x13B);u8g.drawRFrame(0, 20, 128, 44, 4);u8g.drawStr( 30, 10, "BREATHALYZER");u8g.setFont(u8g_font_robot_de_niro);u8g.drawStr( 8, 20, "Careful You can be arrested");u8g.setFont(u8g_font_8x13B);u8g.drawStr( 10, 37, "Wait");if (status == 1){u8g.drawBox(80, 25, 20, 30);u8g.drawHLine(77, 24, 26);u8g.drawRFrame(78, 25 , 24, 32, 0);u8g.drawRFrame(77, 25 , 26, 32, 0);u8g.drawHLine(76, 57, 28);u8g.drawHLine(76, 58, 28);u8g.drawRFrame(102, 30 , 7, 20, 2);u8g.drawRFrame(102, 28 , 9, 24, 2);u8g.setColorIndex(0);if (time == 0){time = 1;}u8g.drawBox(79, 25, 22, time);u8g.setColorIndex(1);}if (status == 0){u8g.setFont(u8g_font_fub20);u8g.setColorIndex(0);u8g.drawBox(10, 25, 110, 33);u8g.setColorIndex(1);if (value_sensor <= 99){position1 = 50;}else{position1 = 43;}u8g.setPrintPos(position1, 45);u8g.print(value_sensor);u8g.setFont(u8g_font_orgv01);int size = state.length();int position = (128/2) - ((size * 5) / 2);u8g.setPrintPos(position, 60);u8g.print(state);}}void setup(void){Serial.begin(9600);pinMode(A0, INPUT);if ( u8g.getMode() == U8G_MODE_R3G3B2 ){u8g.setColorIndex(255);}else if ( u8g.getMode() == U8G_MODE_GRAY2BIT ) {u8g.setColorIndex(3);}else if ( u8g.getMode() == U8G_MODE_BW ) {u8g.setColorIndex(1);}else if ( u8g.getMode() == U8G_MODE_HICOLOR ) {u8g.setHiColorByRGB(255, 255, 255);}i=0;j=7;while(i < qtdLED){LEDs[i] = j;i++;j++;}for (i = 0; i < qtdLED; i++){pinMode(LEDs[i], OUTPUT);}digitalWrite(2, OUTPUT);}void loop(void){value_sensor = analogRead(A0);time = millis() / 1000;u8g.firstPage();if (time <= maxTime){time = map(time, 0, maxTime, 0, 30);status = 1;}else{status = 0;}if (value_sensor >= 0 and value_sensor <= 100){state = "You are safe";}else if (value_sensor >= 101 and value_sensor <= 200){state = "I know that you drank beer";}else if (value_sensor >= 201 and value_sensor <= 300){state = "Drank tequila, hm?";}else if (value_sensor >= 301 and value_sensor <= 400){state = "Very bad breath";}else if (value_sensor >= 401 and value_sensor <= 550){state = "You may go to jail";}else if (value_sensor >= 551){state = "You are trapped completely";}do{draw();}while (u8g.nextPage() );delay(50);//LEDint sensor = analogRead(A0);if(sensor >= 40){digitalWrite(2, HIGH);maximumReading = 0;for(count=0;count<=500;count++){int sensor = analogRead(A0);delay(1);if(sensor > maximumReading){maximumReading = sensor;}}digitalWrite(2, LOW);int level = map(maximumReading, 0, 551, 0, qtdLED);for (i = 0; i < qtdLED; i++) {if (i < level){digitalWrite(LEDs[i], HIGH);delay(100);}else{digitalWrite(LEDs[i], LOW);}}delay(500);for (i = 0; i < qtdLED; i++) {digitalWrite(LEDs[i],LOW);}}}

    The code written by the author is completely buggy. I have debugged it and converted into English.. It's verified by Arduino IDE without any error....#include "U8glib.h"U8GLIB_ST7920_128X64_1X u8g(5, 4, 3 ,6);#define qtdLED 6int LEDs[qtdLED];int count;int value_sensor = 0;unsigned long time;int maxTime = 300;int status = 1;String state;int position1;int i;int j;int maximumReading;void draw(){u8g.setFont(u8g_font_8x13B);u8g.drawRFrame(0, 20, 128, 44, 4);u8g.drawStr( 30, 10, "BREATHALYZER");u8g.setFont(u8g_font_robot_de_niro);u8g.drawStr( 8, 20, "Careful You can be arrested");u8g.setFont(u8g_font_8x13B);u8g.drawStr( 10, 37, "Wait");if (status == 1){u8g.drawBox(80, 25, 20, 30);u8g.drawHLine(77, 24, 26);u8g.drawRFrame(78, 25 , 24, 32, 0);u8g.drawRFram...see more »The code written by the author is completely buggy. I have debugged it and converted into English.. It's verified by Arduino IDE without any error....#include "U8glib.h"U8GLIB_ST7920_128X64_1X u8g(5, 4, 3 ,6);#define qtdLED 6int LEDs[qtdLED];int count;int value_sensor = 0;unsigned long time;int maxTime = 300;int status = 1;String state;int position1;int i;int j;int maximumReading;void draw(){u8g.setFont(u8g_font_8x13B);u8g.drawRFrame(0, 20, 128, 44, 4);u8g.drawStr( 30, 10, "BREATHALYZER");u8g.setFont(u8g_font_robot_de_niro);u8g.drawStr( 8, 20, "Careful You can be arrested");u8g.setFont(u8g_font_8x13B);u8g.drawStr( 10, 37, "Wait");if (status == 1){u8g.drawBox(80, 25, 20, 30);u8g.drawHLine(77, 24, 26);u8g.drawRFrame(78, 25 , 24, 32, 0);u8g.drawRFrame(77, 25 , 26, 32, 0);u8g.drawHLine(76, 57, 28);u8g.drawHLine(76, 58, 28);u8g.drawRFrame(102, 30 , 7, 20, 2);u8g.drawRFrame(102, 28 , 9, 24, 2);u8g.setColorIndex(0);if (time == 0){time = 1;}u8g.drawBox(79, 25, 22, time);u8g.setColorIndex(1);}if (status == 0){u8g.setFont(u8g_font_fub20);u8g.setColorIndex(0);u8g.drawBox(10, 25, 110, 33);u8g.setColorIndex(1);if (value_sensor <= 99){position1 = 50;}else{position1 = 43;}u8g.setPrintPos(position1, 45);u8g.print(value_sensor);u8g.setFont(u8g_font_orgv01);int size = state.length();int position = (128/2) - ((size * 5) / 2);u8g.setPrintPos(position, 60);u8g.print(state);}}void setup(void){Serial.begin(9600);pinMode(A0, INPUT);if ( u8g.getMode() == U8G_MODE_R3G3B2 ){u8g.setColorIndex(255);}else if ( u8g.getMode() == U8G_MODE_GRAY2BIT ) {u8g.setColorIndex(3);}else if ( u8g.getMode() == U8G_MODE_BW ) {u8g.setColorIndex(1);}else if ( u8g.getMode() == U8G_MODE_HICOLOR ) {u8g.setHiColorByRGB(255, 255, 255);}i=0;j=7;while(i < qtdLED){LEDs[i] = j;i++;j++;}for (i = 0; i < qtdLED; i++){pinMode(LEDs[i], OUTPUT);}digitalWrite(2, OUTPUT);}void loop(void){value_sensor = analogRead(A0);time = millis() / 1000;u8g.firstPage();if (time <= maxTime){time = map(time, 0, maxTime, 0, 30);status = 1;}else{status = 0;}if (value_sensor >= 0 and value_sensor <= 100){state = "You are safe";}else if (value_sensor >= 101 and value_sensor <= 200){state = "I know that you drank beer";}else if (value_sensor >= 201 and value_sensor <= 300){state = "Drank tequila, hm?";}else if (value_sensor >= 301 and value_sensor <= 400){state = "Very bad breath";}else if (value_sensor >= 401 and value_sensor <= 550){state = "You may go to jail";}else if (value_sensor >= 551){state = "You are trapped completely";}do{draw();}while (u8g.nextPage() );delay(50);//LEDint sensor = analogRead(A0);if(sensor >= 40){digitalWrite(2, HIGH);maximumReading = 0;for(count=0;count<=500;count++){int sensor = analogRead(A0);delay(1);if(sensor > maximumReading){maximumReading = sensor;}}digitalWrite(2, LOW);int level = map(maximumReading, 0, 551, 0, qtdLED);for (i = 0; i < qtdLED; i++) {if (i < level){digitalWrite(LEDs[i], HIGH);delay(100);}else{digitalWrite(LEDs[i], LOW);}}delay(500);for (i = 0; i < qtdLED; i++) {digitalWrite(LEDs[i],LOW);}}}

    View Instructable »
  • abhra0897 commented on abhishek18's instructable homemade rc car7 months ago
    homemade rc car

    I know how to appreciate, but appreciation only goes to who deserves it. BTW, I admitted already that your tutorial was nice. In addition I just mentioned some serious draw backs of the article. Your intolerance with criticism might not help you in the future...

    View Instructable »
  • abhra0897 commented on abhishek18's instructable homemade rc car7 months ago
    homemade rc car

    ​Why didn't you gave any clear circuit diagram? Not even a pencil sketch! The PCB (?) diagram images you gave are just awful.. The tutorial is good but designed in a bad way.

    View Instructable »
  • Programming AVR with Arduino as ISP without bootloader and external crystal

    Dear, click the link on beginning of tutorial .. On "THIS SITE" text.. Or go to https://riktronics.wordpress.com/2016/07/26/program-avr-using-arduino-simplest-way/

    View Instructable »
  • Programming AVR with Arduino as ISP without bootloader and external crystal

    Hi everyone. This tutorial is updated and pubished in my site. All files are available there. Please visit https://riktronics.wordpress.com/2016/07/26/program-avr-using-arduino-simplest-way/#more-621 .

    View Instructable »