<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Ardiuno%3A_Tone_Pitch_Follower</id>
	<title>Ardiuno: Tone Pitch Follower - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Ardiuno%3A_Tone_Pitch_Follower"/>
	<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=Ardiuno:_Tone_Pitch_Follower&amp;action=history"/>
	<updated>2026-04-21T09:44:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://lms.onnocenter.or.id/wiki/index.php?title=Ardiuno:_Tone_Pitch_Follower&amp;diff=45251&amp;oldid=prev</id>
		<title>Onnowpurbo: New page: Sumber: https://www.arduino.cc/en/Tutorial/tonePitchFollower   This example shows how to use the tone() command to generate a pitch that follows the values of an analog input. Using a phot...</title>
		<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=Ardiuno:_Tone_Pitch_Follower&amp;diff=45251&amp;oldid=prev"/>
		<updated>2015-12-05T09:39:21Z</updated>

		<summary type="html">&lt;p&gt;New page: Sumber: https://www.arduino.cc/en/Tutorial/tonePitchFollower   This example shows how to use the tone() command to generate a pitch that follows the values of an analog input. Using a phot...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sumber: https://www.arduino.cc/en/Tutorial/tonePitchFollower&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example shows how to use the tone() command to generate a pitch that follows the values of an analog input. Using a photoresistor your Arduino or Genuino board becomes a simplified light theremin. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Hardware Required==&lt;br /&gt;
&lt;br /&gt;
* Arduino or Genuino board&lt;br /&gt;
* 8 ohm speaker&lt;br /&gt;
* photoresistor&lt;br /&gt;
* 4.7K ohm resistor&lt;br /&gt;
* 100 ohm resistor&lt;br /&gt;
* hook-up wires&lt;br /&gt;
* breadboard &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Rangkaian==&lt;br /&gt;
&lt;br /&gt;
[[Image:Arduino speaker photocell bb.png|center|200px|thumb]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Arduino speaker photocell schem.png|center|200px|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   Pitch follower&lt;br /&gt;
 &lt;br /&gt;
  Plays a pitch that changes based on a changing analog input&lt;br /&gt;
 &lt;br /&gt;
  circuit:&lt;br /&gt;
  * 8-ohm speaker on digital pin 9&lt;br /&gt;
  * photoresistor on analog 0 to 5V&lt;br /&gt;
  * 4.7K resistor on analog 0 to ground&lt;br /&gt;
 &lt;br /&gt;
  created 21 Jan 2010&lt;br /&gt;
  modified 31 May 2012&lt;br /&gt;
  by Tom Igoe, with suggestion from Michael Flynn&lt;br /&gt;
 &lt;br /&gt;
 This example code is in the public domain.&lt;br /&gt;
 &lt;br /&gt;
  http://www.arduino.cc/en/Tutorial/Tone2&lt;br /&gt;
 &lt;br /&gt;
  */&lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
 void setup() {&lt;br /&gt;
   // initialize serial communications (for debugging only):&lt;br /&gt;
   Serial.begin(9600);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 void loop() {&lt;br /&gt;
   // read the sensor:&lt;br /&gt;
   int sensorReading = analogRead(A0);&lt;br /&gt;
   // print the sensor reading so you know its range&lt;br /&gt;
   Serial.println(sensorReading);&lt;br /&gt;
   // map the analog input range (in this case, 400 - 1000 from the photoresistor)&lt;br /&gt;
   // to the output pitch range (120 - 1500Hz)&lt;br /&gt;
   // change the minimum and maximum input numbers below&lt;br /&gt;
   // depending on the range your sensor&amp;#039;s giving:&lt;br /&gt;
   int thisPitch = map(sensorReading, 400, 1000, 120, 1500);&lt;br /&gt;
 &lt;br /&gt;
   // play the pitch:&lt;br /&gt;
   tone(9, thisPitch, 10);&lt;br /&gt;
   delay(1);        // delay in between reads for stability&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* https://www.arduino.cc/en/Tutorial/tonePitchFollower&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>