chiark / gitweb /
wiringPi Version 2 - First commit (of v2)
[wiringPi.git] / examples / softTone.c
similarity index 92%
rename from examples/tone.c
rename to examples/softTone.c
index 0e8a47d85a842eb090270ba64d3876401de4f23a..2f46783e9ac915e451b21b687f33da8d19dd050c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * tone.c:
+ * softTone.c:
  *     Test of the softTone module in wiringPi
  *     Plays a scale out on pin 3 - connect pizeo disc to pin 3 & 0v
  *
@@ -38,11 +38,7 @@ int main ()
 {
   int i ;
 
-  if (wiringPiSetup () == -1)
-  {
-    fprintf (stdout, "oops: %s\n", strerror (errno)) ;
-    return 1 ;
-  }
+  wiringPiSetup () ;
 
   softToneCreate (PIN) ;
 
@@ -55,5 +51,4 @@ int main ()
       delay (500) ;
     }
   }
-
 }