Skip to main content

[Arduino Project - 3] -- Sensor Suhu

Bismillah...
Selamat siang semua, pada postingan tentang Arduino kali ini kita akan bermain-main dengan suhu. Yup, kita akan membuat sensor suhu menggunakan Arduino.
Bagi yang belum tahu apa itu Arduino, bisa cari tahu disini nih.
Sebelum memulai membuat sensor suhu, terlebih dahulu kita perlu menyiapkan peralatan berikut:


  • Arduino Uno
  • Sensor Suhu LM35
  • Komputer yang terinstall aplikasi arduino
  • Kabel penghubung
  • Kabel Jumper (Jika Perlu)
  • Bread Board (Jika Perlu)
Sebenarnya yang kita perlukan hanya empat alat pertama, akan tetapi, jika tidak ingin kaki sensor suhunya bengkok-bengkok terlalu parah, bisa menggunakan breadboard dan jumper

Setelah semuanya siap, selanjutnya kita menyusun rangkaian seperti berikut:

Selanjutnya, kita jalankan program arduino di komputer kita dan ketikkan kode berikut:



/*
lm35 sketch
prints the temperature to the Serial Monitor
*/
const int inPin = 0; // analog pin

void setup()
{
    Serial.begin(9600);
}

void loop()
{
    int value = analogRead(inPin);
    Serial.print(value); Serial.print(" > ");
    float millivolts = (value / 1024.0) * 5000;
    float celsius = millivolts / 10; // sensor output is 10mV per degree Celsius
    Serial.print(celsius);
    Serial.print(" degrees Celsius, ");
    Serial.print( (celsius * 9)/ 5 + 32 ); // converts to fahrenheit
    Serial.println(" degrees Fahrenheit");
    delay(1000); // wait for one second
}

Setelah itu, verify kode, sambungkan arduino dengan komputer dan  upload kode program ke arduino.Terakhir, klik menu 'tools' di software arduino, pilih 'Serial Monitor', maka akan muncul jendela baru yang menampilkan suhu dalam celsius dan dalam fahrenheit.
Hasilnya akan seperti berikut:

Ta da! Kita punya sensor suhu. Kita bisa bermain2 mengukur suhu di sekitar. hehe :)
Selamat Mencoba, semoga bermanfaat....

Comments

Popular posts from this blog

Korps Dai Mahasiswa (KDM) Salman ITB

Dai Corps Students, or shortened to KDM Salman ITB , is a recitation of activities held at Salman Mosque and intended for ITB students and also public. Located in the South Corridor Salman Mosque, KDM Salman ITB is trying to bring teaching activities with the concept of traditional pesantren (traditional boarding school). With meetings every day after dhuhur, the students who take part in this Salman KDM get the study material by using the yellow books (kitab kuning) as a handle, as in the traditional pesantren. Teachers who bring the study also vary depending on the items of its study, they are ustadzs from Salman mosque itself. KDM Salman ITB appears to address concerns some students, as well as some ustadzs in mosques Salman, who feel that it is necessary to foster student containers in religious matters. It is motivated by the proliferation of such activities 'mentoring' on campus. But the mentor who brought the material (ie students) were deemed less or even not ...

My Blog's Template (Is it beautiful enough?)

Choosing template for our blog is a little bit difficult because we need to make sure it has a nice structure, easily used and perhaps fit in our style or our soul or our wish. Some blogs I found have sooo good in arranging their view so that I can easily browse its contents and also have an eye catching style which makes my eyes keep open. But some blogs also have (if I can say) terrible design which I won't be able to see it twice. It has a lot of ads here and there, it has awful structures like: "I don't know where to begin with" and "I don't know what function is this button for" or "it has bad color choosing", it has so many pictures and some gifs and our cursor is changed into something gross, and so on. Choosing template or theme or our blog's design no needs to be very beautiful (even I don't say that mine is), but at least it has a 'good' design that allows reader to read it easily. I've tried to create template...

[Arduino Project-1] -- PushButton Lamp

Apa sih Arduino? Salam, Pada posting kali ini akan menjelaskan tentang tugas kuliah Interaksi Manusia dengan Komputer dan Antar Muka, yaitu membuat lampu push button menggunakan Arduino. Saya anggap pembaca telah mengetahui apa itu arduino. Jika belum tahu, akan saya jelaskan sedikit. Arduino bisa dikatakan sebagai alat untuk membuat sebuah prototye. Kita bisa  membuat apapun (hampir apapun) dengan menggunakan arduino. Seperti membuat sensor panas/dingin,bahkan hingga membuat robot. Arduino sebenarnya diperuntukkan bagi para artist maupun designer yang memerlukan kemudahan dalam merancang produk yang hendak mereka buat. Jadi, untuk menggunakannya tidak diperlukan keterampilan khusus yang tinggi karena di design untuk kemudahan (tentunya setelah tahu dasar-dasarnya). Seperti apa sih Arduino itu? Di bawah ini gambarnya Image Source: https://dlnmh9ip6v2uc.cloudfront.net//images/products/1/1/0/2/1/11021-01a.jpg Arduino ada banyak jenisnya yang bisa dilihat...