Translate

Tensimeter Digital Online Blynk + BPM Heartbeat

 Tensimeter Digital Online Blynk + BPM Heartbeat


         Pada kesempatan kali ini saya aka menjelaskan mengenai bagaimana cara membuat sebuah tensimeter digital yang dapat dimonitor secara online menggunakan aplikasi Blynk. alat ini layaknya seperti tensimeter yang dapat mengukur sistole dan diastole serta juga dapat mengukur bpm. yang harus diperhatikan pada alat ini yaitu harus dilakukan kalibrasi secara berkala agar didapat hasil yang akurat.



a. Wemos D1 mini




b. Sensor MPX5050GP




c. LCD 16x2 + I2C




d. Sensor Bpm Max30100




e. Driver Pompa dan Solenoid




f. Skema Alat





g. Program Arduino IDE

#include <Arduino.h>
#include <math.h>
#include <Wire.h>
#define BLYNK_PRINT Serial    
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
#include "MAX30100.h"
#include <LiquidCrystal_I2C.h>

MAX30100* pulseOxymeter;
LiquidCrystal_I2C lcd(0x27, 16,2);

char auth[] = "hjgjhgjhGJHGOIUOiuoikjbbhvSDGDH";
char ssid[] = "hotspotku hp";
char pass[] = "123456789";

SimpleTimer timer;

float spo;
float bpm;
int counter;
int motor = D7;
int solenoid = D6;
int dataadc;
int tombol = D4;
int tombolx;
int hitung;
float vol;
float mmhg;
float mmhgx;
float sistole;
float diastole;
int sistolex;
int diastolex;
int mark = 0;

void sendSensor()
{
 Blynk.virtualWrite(V5, bpm);
 Blynk.virtualWrite(V6, sistolex);
 Blynk.virtualWrite(V7, diastolex);
 delay(1000);
}

void setup() {
  lcd.clear();
  lcd.begin();
  lcd.noCursor();
  Wire.begin();
  Serial.begin(9600);
  Serial.println("Pulse oxymeter test!");
  pulseOxymeter = new MAX30100();
  Blynk.begin(auth, ssid, pass);
  timer.setInterval(1000L, sendSensor);
  pinMode(motor,OUTPUT);
  pinMode(solenoid,OUTPUT);
  pinMode(tombol,INPUT_PULLUP);

 lcd.setCursor(0,0);
 lcd.print("BPM= ");
 lcd.setCursor(0,1);
 lcd.print("S=   D= ");
}

void loop() {
 dataadc = analogRead(A0);
 mmhgx = (dataadc - 46.222) / 3.2;

 lcd.setCursor(0,1);
 lcd.print("S= ");
 lcd.print(sistolex);
 lcd.print(" D= ");
 lcd.print(diastolex);
 lcd.print("    ");
     
 tombolx = digitalRead(tombol); 

 if(tombolx == LOW){
  mark = 0;
  lcd.clear();
  delay(1000);
  digitalWrite(motor,HIGH);
  digitalWrite(solenoid,HIGH);
  mulai();
  }
    
  pulseoxymeter_t result = pulseOxymeter->update();
  
if( result.pulseDetected == true )
  {    
    //Serial.print( "BPM: " );
    //Serial.print( result.heartBPM );
    lcd.setCursor(0,0);
    lcd.print("BPM= ");
    lcd.print(result.heartBPM);
    lcd.print("     ");
    
    bpm = result.heartBPM;
    spo = result.SaO2;
  }

counter++;

if(counter > 100){
 counter = 0;
 Blynk.run();
 timer.run();
}

delay(10); 
}

void mulai(){
  
 dataadc = analogRead(A0);
 mmhg = (dataadc - 46.222) / 3.2;

if((mmhg >= mmhgx + 10)&&(mmhg > 100)&&(mark == 0)){
//digitalWrite(motor,LOW); 
Serial.println("SISTOLE"); 
sistole = mmhg;
mark = 2; 
digitalWrite(motor,LOW);
}

if((mmhg >= mmhgx + 5)&&(mmhg > 50)&&(mmhg < 90)&&(mark == 2)){
//digitalWrite(motor,LOW); 
Serial.println("DIASTOLE"); 
diastole = mmhg;
mark = 3;
}

 lcd.setCursor(0,1);
 lcd.print("S= ");
 lcd.print(mmhg);
 lcd.print("     ");

if(mmhg >= 150)
{
 digitalWrite(motor,LOW);   
}

mmhgx = mmhg;

Serial.println(mmhg);

if((mark == 3)&&(mmhg < 50)){
lcd.clear();
delay(1000);
mark = 0;
sistolex = sistole;
diastolex = diastole;
digitalWrite(solenoid,LOW);
Blynk.run();
timer.run();
return;  
}

delay(1);   
mulai();  
}


 

h. VIDEO HASILNYA










Kendali Kipas Angin Menggunakan Gesture Tangan Sensor APDS 9960

 Kendali Kipas Angin Menggunakan Gesture Tangan Sensor APDS 9960


           Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat sebuah alat yang berfungsi untuk mengendalikan kecepatan putaran kipas angin dengan menggunakan gerakan tangan atau gesture. alat ini dilengkapi dengan sensor APDS 9960 dan untuk kendali kecepatan dengan menggunakan relay modul. untuk lebih jelasnya berikut adalah program dan daftar komponennya.



a. Arduino Uno




b. Sensor Gesture APDS 9960




c. Relay Module






d. Program Arduino IDE

#include <Wire.h>
#include <SparkFun_APDS9960.h>

// Pins
#define APDS9960_INT    2 // Needs to be an interrupt pin

// Constants

// Global Variables
SparkFun_APDS9960 apds = SparkFun_APDS9960();
int isr_flag = 0;

int speedx;

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);
  
  digitalWrite(3, HIGH);
  digitalWrite(4, HIGH);
  digitalWrite(5, HIGH);
  digitalWrite(6, HIGH);
  digitalWrite(7, HIGH);
  digitalWrite(8, HIGH);
  digitalWrite(9, HIGH);
  digitalWrite(10, HIGH);

  // Set interrupt pin as input
  pinMode(APDS9960_INT, INPUT);

  // Initialize Serial port
  Serial.begin(9600);
  Serial.println();
  Serial.println(F("--------------------------------"));
  Serial.println(F("Y-GESTURE APDS - GestureTest"));
  Serial.println(F("--------------------------------"));
 
  // Initialize interrupt service routine
  attachInterrupt(0, interruptRoutine, FALLING);

  // Initialize APDS-9960 (configure I2C and initial values)
  if ( apds.init() ) {
    Serial.println(F("APDS-9960 initialization complete"));
  } else {
    Serial.println(F("Something went wrong during APDS-9960 init!"));
  }
 
 //  Start running the APDS-9960 gesture sensor engine
  if ( apds.enableGestureSensor(true) ) {
    Serial.println(F("Gesture sensor is now running"));
  } else {
    Serial.println(F("Something went wrong during gesture sensor init!"));
  }
}

void loop() {
  if( isr_flag == 1 ) {
    detachInterrupt(0);
    handleGesture();
    isr_flag = 0;
    attachInterrupt(0, interruptRoutine, FALLING);
  }

if(speedx == 0){
        digitalWrite(3, HIGH);
        digitalWrite(5, HIGH);
        digitalWrite(6, HIGH);
        digitalWrite(7, HIGH);
  }

if(speedx == 1){
        digitalWrite(3, HIGH);
        digitalWrite(5, LOW);
        digitalWrite(6, HIGH);
        digitalWrite(7, HIGH);
  }

if(speedx == 2){
        digitalWrite(3, HIGH);
        digitalWrite(5, HIGH);
        digitalWrite(6, LOW);
        digitalWrite(7, HIGH);
  }  

if(speedx == 3){
        digitalWrite(3, HIGH);
        digitalWrite(5, HIGH);
        digitalWrite(6, HIGH);
        digitalWrite(7, LOW);
  }  


if(speedx > 3){  
  speedx = 3;
}

if(speedx < 0){  
  speedx = 0;
}
}

void interruptRoutine() {
  isr_flag = 1;
}

void handleGesture() {
    if ( apds.isGestureAvailable() ) {
    switch ( apds.readGesture() ) {
      case DIR_UP:
        Serial.println("UP");
        speedx++;
      
        break;
      case DIR_DOWN:
        Serial.println("DOWN");
        speedx--;
        
        break;
      case DIR_LEFT:
        Serial.println("LEFT");
        digitalWrite(4, LOW);
 
        break;
      case DIR_RIGHT:
        Serial.println("RIGHT");
        digitalWrite(4, HIGH);
        
        break;
      case DIR_NEAR:
        Serial.println("NEAR");

        break;
      case DIR_FAR:
        Serial.println("FAR");

        break;
      default:
        Serial.println("NONE");
    }
  }
}





e. VIDEO HASILNYA











Tutorial Kalibrasi Tensimeter Digital

 Tutorial Kalibrasi Tensimeter Digital
 

          Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara kalibrasi sebuah tensimeter digital agar hasil pengukuran bisa akurat dan sesuai standart pabrik. tutorial ini juga termasuk langkah awal didalam pembuatan tensimeter digital. sensor yang digunakan adalah mpx5050GP yang mana maksimal pengukuran adalah 50 kpa. untuk lebih jelasnya berikut adalah program dan daftar komponennya. 



a. Wemos D1 Mini




b. Sensor MPX5050GP






c. Program Arduino IDE

#include <Arduino.h>
#include <math.h>
#include <Wire.h>
#define BLYNK_PRINT Serial    
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16,2);

SimpleTimer timer;

float spo;
float bpm;
int counter;
int motor = D7;
int solenoid = D6;
int dataadc;
int tombol = D4;
int tombolx;
int hitung;
float vol;
float kpa;
float mmhg;

void setup() {
  lcd.clear();
  lcd.begin();
  lcd.noCursor();
  Serial.begin(9600);
  pinMode(motor,OUTPUT);
  pinMode(tombol,INPUT_PULLUP);
}

void loop() {

 tombolx = digitalRead(tombol);

 if(tombolx == LOW){
  digitalWrite(motor,HIGH);
  }

 if(tombolx == HIGH){
  digitalWrite(motor,LOW);
  }  
    
dataadc = analogRead(A0);
mmhg = (dataadc - 46.222) / 3.2;

if(mmhg < 0){
  mmhg = 0;
  }

 lcd.setCursor(0,0);
 lcd.print("ADC= ");
 lcd.print(dataadc);
 lcd.print("     ");
 lcd.setCursor(0,1);
 lcd.print("mmHg= ");
 lcd.print(mmhg);
 lcd.print("     ");
 
 delay(200);
}

 
 
d. Hasil Kalibrasi






e. VIDEO HASILNYA




 
 
 
 
 

Monitor Kelembaban Tanah dan Kendali Pompa via TELEGRAM

 Monitor Kelembaban Tanah dan Kendali Pompa via TELEGRAM
 

           Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat sebuah alat dengan menggunakan Wemos D1 yang dapat mengendalikan pompa dan monitor RH tanah melalui aplikasi telegram. keunggulan melalui telegram yaitu berbasis chat sehingga kita bisa monitor RH jika kita butuhkan saja dan juga untuk mengendalikan pompa juga seperti kita chat dengan seseorang sehingga lebih mudah digunakan. untuk lebih jelasnya berikut adalah program dan daftar komponennya.
 
 
 
a. Wemos D1
 

 
 
b. Modul Relay
 

 
 
c. Sensor Kelembaban Tanah
 

 
 
d. LCD + I2C
 

 
 
e. Setting Telegram








 
f. Program Arduino IDE versi 1.8.4
 
#include <CTBot.h>
CTBot myBot;
 
String ssid  = "Hotspotku OK";
String pass  = "123456789";
String token = "3876092376:JHGJHgjhgjhfsdadswqepioIPOPHHKJHBnbix";

int dryValue = 1023;
int wetValue = 0;
int friendlyDryValue = 100;
int friendlyWetValue = 0;

int rawValue;
float mapping;
const int mout1 = 14;                        
 float nddi1;
 
void setup() {
  // initialize the Serial
  Serial.begin(9600);
   
  Serial.println("Starting TelegramBot...");
  myBot.wifiConnect(ssid, pass);
  myBot.setTelegramToken(token);
 
  // check if all things are ok
  if (myBot.testConnection())
    Serial.println("\ntestConnection OK");
  else
    Serial.println("\ntestConnection NOK");

 pinMode(mout1, OUTPUT);
  // set the pin connected to the LED to act as output pin
  //digitalWrite(mout1, HIGH); // turn off the led (inverted logic!)
 
}
 
void loop() {
 
      rawValue = analogRead(A0);          
 //mapping = map(rawValue, dryValue, wetValue, friendlyDryValue, friendlyWetValue);
 //nddi = mapping /100;

  nddi1 = map(rawValue, dryValue, wetValue, friendlyDryValue, friendlyWetValue);

 

  // a variable to store telegram message data
  TBMessage msg;
 
  // if there is an incoming message...
   if (myBot.getNewMessage(msg)) {
    if (msg.text.equalsIgnoreCase("Hum")) {
    Serial.print("Kelembaban saat ini : ");
    Serial.println(nddi1);   
     String rawValue = "Kelembaban saat ini  : ";
      rawValue += int(nddi1);
      rawValue += "  %\n";
       myBot.sendMessage(msg.sender.id, rawValue,""); //Balasan dari perangkat ke Bot Telegram
    }

    if (msg.text.equalsIgnoreCase("On")) {                   //Perintah dari telegram ke perangkat
      digitalWrite(mout1, HIGH);                              //Lampi dihidupkan
      myBot.sendMessage(msg.sender.id, "The Pump is now ON"); //Balasan dari perangkat ke Bot Telegram
    }
    else if (msg.text.equalsIgnoreCase("Off")) {              //Perintah dari telegram ke perangkat
      digitalWrite(mout1, LOW);                              //Lampi dihidupkan
      myBot.sendMessage(msg.sender.id, "The Pump is now OFF"); //Balasan dari perangkat ke Bot Telegram
    }
    else {                                                    // otherwise...
      // generate the message for the sender
      String reply;
      reply = (String)"Welcome " + msg.sender.username + (String)". Try PUMP ON or PUMP OFF.";
      myBot.sendMessage(msg.sender.id, reply);    
     // and send it
    
    }
   
  }
  // wait 500 milliseconds
  delay(3000);
}
 
 
 
 
g. VIDEO HASILNYA
 

 
 
 
 

Monitor Kelembaban Tanah (Soil Moisture) dan Kendali Pompa via Internet ONLINE Blynk

 Monitor Kelembaban Tanah dan Kendali Pompa via Internet ONLINE Blynk


         Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat sebuah alat yang menggunakan internet untuk keperluan monitoring kelembaban tanah dan kendali pompa. keunggulan alat ini yaitu dapat dipantau dan dikendalikan secara jarak jauh karena menggunakan internet sehingga kedua device harus terkonek internet agar saling terhubung. untuk lebih jelasnya berikut program dan daftar komponenya.



a. Wemos D1 Mini




b. LCD I2C 




c. Sensor Kelembaban Tanah




d. Relay Module






e. Program Arduino IDE

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#define  BLYNK_PRINT Serial    
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
#include <SPI.h>

int dryValue = 1023;
int wetValue = 0;
int friendlyDryValue = 100;
int friendlyWetValue = 0;
float nddi;
int rawValue;
float mapping;

char auth[ ] = "hjgjfyjhEJDJRKRdfgddfkjhkjhJETDDFH";
char ssid[ ] = "Hotspot hpku";
char pass[ ] = "123456789";

SimpleTimer timer;

void sendSensor()
{
  
Blynk.virtualWrite(V5, nddi);
delay(1000);
   
}

void setup()
{
lcd.begin();
lcd.clear();
lcd.noCursor();
lcd.backlight();

 Blynk.begin(auth, ssid, pass);
  timer.setInterval(1000L, sendSensor);
}

void loop()
{
 
 rawValue = analogRead(A0);          
 //mapping = map(rawValue, dryValue, wetValue, friendlyDryValue, friendlyWetValue);
 //nddi = mapping /100;

  nddi = map(rawValue, dryValue, wetValue, friendlyDryValue, friendlyWetValue);
 
  lcd.setCursor(0,0);
  lcd.print("S= ");
  lcd.print(nddi);
  lcd.print("    %     ");
  
       Blynk.run();
      timer.run();
 
  if( nddi <= 27.0 ){
  lcd.setCursor(0, 1);
  lcd.print("AIR            ");
  }
 
  if(( nddi > 28.0 )&&(nddi <= 30.0 )){
  lcd.setCursor(0, 1);
  lcd.print("NORMAL         ");
  }
 
  if(( nddi > 32.0 )&&(nddi <= 40.0 )){
  lcd.setCursor(0, 1);
  lcd.print("KERING RINGAN   ");
  }
 
 delay(200);
}




f. VIDEO HASILNYA








Interface Delphi 7 untuk Data 6 Grafik Realtime

 Interface Delphi 7 untuk Data 6 Grafik Realtime


      Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat software interface dengan menggunakan Delphi 7 untuk menampilkan 6 buah data dan grafik secara realtime berdasarkan input dari arduino menggunakan serial. untuk lebih jelasnya berikut adalah tampilan interface dan programnya.



a. Interface Delphi 7



unit TA;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls,strutils, TeeProcs, TeEngine, Chart, CPort, mmsystem,
  Series, Buttons;

type
  TForm1 = class(TForm)
    ComPort1: TComPort;
    GroupBox1: TGroupBox;
    Edit1: TEdit;
    Edit2: TEdit;
    Chart1: TChart;
    Shape1: TShape;
    Shape2: TShape;
    GroupBox2: TGroupBox;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Memo1: TMemo;
    Timer1: TTimer;
    Label7: TLabel;
    Label8: TLabel;
    BitBtn1: TBitBtn;
    Chart2: TChart;
    Series2: TFastLineSeries;
    Label5: TLabel;
    Timer2: TTimer;
    Chart3: TChart;
    Series3: TFastLineSeries;
    Chart4: TChart;
    Chart5: TChart;
    Chart6: TChart;
    Series4: TFastLineSeries;
    Series5: TFastLineSeries;
    Series6: TFastLineSeries;
    Edit5: TEdit;
    Edit6: TEdit;
    Edit7: TEdit;
    Edit8: TEdit;
    Series1: TFastLineSeries;
    Timer3: TTimer;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label6: TLabel;
    Label9: TLabel;
    procedure ComPort1RxChar(Sender: TObject; Count: Integer);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure Timer2Timer(Sender: TObject);
    procedure Timer3Timer(Sender: TObject);

  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.ComPort1RxChar(Sender: TObject; Count: Integer);
var buff:string;
begin
comport1.ReadStr(buff,count);
memo1.Text:=memo1.Text+buff;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
comport1.ShowSetupDialog;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Timer2.Enabled := True;
Timer3.Enabled := True;
if button2.Caption='Connect' then
   begin
   button2.Caption:='Disconnect';
   comport1.Open;
   end
else if button2.Caption='Disconnect' then
   begin
   button2.Caption:='Connect';
   comport1.Close;
   end;

end;

procedure TForm1.Button3Click(Sender: TObject);
begin
Edit1.Color:=clwhite;
Edit2.Color:=clwhite;
edit1.text:='';
edit2.text:='';
memo1.Text:='';
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
close;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
ThousandSeparator:=',';
DecimalSeparator:='.';
end;


procedure TForm1.Timer1Timer(Sender: TObject);
begin
label7.Caption:='Date  '+ FormatdateTime('d/mm/yyyy',Date);
label8.Caption:='Time  '+ FormatDateTime('hh:nn:ss',Time);
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
close;
end;

procedure TForm1.Timer2Timer(Sender: TObject);
var ruang,kulit,ruangx,kulitx,ruangy,kulity:double;
    rin,kin,rinx,kinx,riny,kiny:string;

begin

  riny:=memo1.Lines[memo1.Lines.count-6];
  kiny:=memo1.Lines[memo1.Lines.count-5];
  rinx:=memo1.Lines[memo1.Lines.count-4];
  kinx:=memo1.Lines[memo1.Lines.count-3];
  rin:=memo1.Lines[memo1.Lines.count-2];
  kin:=memo1.Lines[memo1.Lines.count-1];

  if rightstr(riny,1)= 'a' then
     begin
     edit1.Text:=leftstr(rin,length(rin)-1);
     ruang:=strtofloat(edit1.text);
     Series1.Add(ruang,'',clred) ;
     end;
  if rightstr(kiny,1)='b' then
     begin
     edit2.Text:=leftstr(kin,length(kin)-1);
     kulit:=strtofloat(edit2.text);
     Series2.Add(kulit,'',clgreen) ;
     end;

  if rightstr(rinx,1)= 'c' then
     begin
     edit5.Text:=leftstr(rinx,length(rinx)-1);
     ruangx:=strtofloat(edit5.text);
     Series3.Add(ruangx,'',clred) ;
     end;
  if rightstr(kinx,1)='d' then
     begin
     edit6.Text:=leftstr(kinx,length(kinx)-1);
     kulitx:=strtofloat(edit6.text);
     Series4.Add(kulitx,'',clgreen) ;
     end;

  if rightstr(rin,1)= 'e' then
     begin
     edit7.Text:=leftstr(riny,length(riny)-1);
     ruangy:=strtofloat(edit7.text);
     Series5.Add(ruangy,'',clred) ;
     end;
  if rightstr(kin,1)='f' then
     begin
     edit8.Text:=leftstr(kiny,length(kiny)-1);
     kulity:=strtofloat(edit8.text);
     Series6.Add(kulity,'',clgreen) ;
     end;
end;

procedure TForm1.Timer3Timer(Sender: TObject);
var
  F: TextFile;
begin
  AssignFile(F, 'D:\recordku.txt');
  Append(F);
  WriteLn(F, '======================================');
  WriteLn(F, 'Tanggal = ',label7.Caption);
  WriteLn(F, 'Jam     = ',label8.Caption);
  WriteLn(F, '======================================');

  WriteLn(F, 'Data A : ',Edit1.Text);
  WriteLn(F, 'Data B  : ',Edit2.Text);
  WriteLn(F, 'Data C  : ',Edit3.Text);
  WriteLn(F, 'Data D : ',Edit4.Text);
  WriteLn(F, 'Data E : ',Edit5.Text);
  WriteLn(F, 'Data F : ',Edit6.Text);

  CloseFile(F);
end;

end.




b. Program Arduino IDE

void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue1 = analogRead(A0);
  int sensorValue2 = analogRead(A1);
  int sensorValue3 = analogRead(A2);
  int sensorValue4 = analogRead(A3);
  int sensorValue5 = analogRead(A4);
  int sensorValue6 = analogRead(A5);
  // print out the value you read:
  Serial.print(sensorValue1),Serial.println ('a');
  Serial.print(sensorValue2),Serial.println ('b');
  Serial.print(sensorValue3),Serial.println ('c');
  Serial.print(sensorValue4),Serial.println ('d');
  Serial.print(sensorValue5),Serial.println ('e');
  Serial.print(sensorValue6),Serial.println ('f');
  delay(1000);        // delay in between reads for stability
}




c. VIDEO HASILNYA