Browse files

updated examples

  • Loading branch information...
1 parent b22b567 commit b300ac6a7a42581e1e3ace01a14f6bad45f08fec @kevin-pololu kevin-pololu committed May 7, 2012
View
11 PololuQik/examples/Qik2s12v10Config/Qik2s12v10Config.ino
@@ -14,11 +14,12 @@ should assume that the parameters have already been set correctly.
Required connections between Arduino and qik 2s9v1:
- Arduino qik 2s12v10
- GND -> GND
-Digital Pin 2 -> TX
-Digital Pin 3 -> RX
-Digital Pin 4 -> RESET
+ Arduino qik 2s12v10
+---------------------------
+ GND - GND
+Digital Pin 2 - TX
+Digital Pin 3 - RX
+Digital Pin 4 - RESET
DO NOT connect the 5V output on the Arduino to the 5V output on the qik 2s12v10!
*/
View
23 PololuQik/examples/Qik2s12v10Demo/Qik2s12v10Demo.ino
@@ -1,11 +1,12 @@
/*
Required connections between Arduino and qik 2s12v10:
- Arduino qik 2s12v10
- GND -> GND
-Digital Pin 2 -> TX
-Digital Pin 3 -> RX
-Digital Pin 4 -> RESET
+ Arduino qik 2s12v10
+---------------------------
+ GND - GND
+Digital Pin 2 - TX
+Digital Pin 3 - RX
+Digital Pin 4 - RESET
DO NOT connect the 5V output on the Arduino to the 5V output on the qik 2s12v10!
*/
@@ -32,7 +33,7 @@ void loop()
for (int i = 0; i <= 127; i++)
{
qik.setM0Speed(i);
- if (abs(i%64) == 32)
+ if (abs(i) % 64 == 32)
{
Serial.print("M0 current: ");
Serial.println(qik.getM0CurrentMilliamps());
@@ -43,7 +44,7 @@ void loop()
for (int i = 127; i >= -127; i--)
{
qik.setM0Speed(i);
- if (abs(i%64) == 32)
+ if (abs(i) % 64 == 32)
{
Serial.print("M0 current: ");
Serial.println(qik.getM0CurrentMilliamps());
@@ -54,7 +55,7 @@ void loop()
for (int i = -127; i <= 0; i++)
{
qik.setM0Speed(i);
- if (abs(i%64) == 32)
+ if (abs(i) % 64 == 32)
{
Serial.print("M0 current: ");
Serial.println(qik.getM0CurrentMilliamps());
@@ -65,7 +66,7 @@ void loop()
for (int i = 0; i <= 127; i++)
{
qik.setM1Speed(i);
- if (abs(i%64) == 32)
+ if (abs(i) % 64 == 32)
{
Serial.print("M1 current: ");
Serial.println(qik.getM1CurrentMilliamps());
@@ -76,7 +77,7 @@ void loop()
for (int i = 127; i >= -127; i--)
{
qik.setM1Speed(i);
- if (abs(i%64) == 32)
+ if (abs(i) % 64 == 32)
{
Serial.print("M1 current: ");
Serial.println(qik.getM1CurrentMilliamps());
@@ -87,7 +88,7 @@ void loop()
for (int i = -127; i <= 0; i++)
{
qik.setM1Speed(i);
- if (abs(i%64) == 32)
+ if (abs(i) % 64 == 32)
{
Serial.print("M1 current: ");
Serial.println(qik.getM1CurrentMilliamps());
View
13 PololuQik/examples/Qik2s9v1Config/Qik2s9v1Config.ino
@@ -14,12 +14,13 @@ should assume that the parameters have already been set correctly.
Required connections between Arduino and qik 2s9v1:
- Arduino qik 2s9v1
- 5V -> VCC
- GND -> GND
-Digital Pin 2 -> TX
-Digital Pin 3 -> RX
-Digital Pin 4 -> RESET
+ Arduino qik 2s9v1
+-------------------------
+ 5V - VCC
+ GND - GND
+Digital Pin 2 - TX
+Digital Pin 3 - RX
+Digital Pin 4 - RESET
*/
#include <SoftwareSerial.h>
View
13 PololuQik/examples/Qik2s9v1Demo/Qik2s9v1Demo.ino
@@ -1,12 +1,13 @@
/*
Required connections between Arduino and qik 2s9v1:
- Arduino qik 2s9v1
- 5V -> VCC
- GND -> GND
-Digital Pin 2 -> TX
-Digital Pin 3 -> RX
-Digital Pin 4 -> RESET
+ Arduino qik 2s9v1
+-------------------------
+ 5V - VCC
+ GND - GND
+Digital Pin 2 - TX
+Digital Pin 3 - RX
+Digital Pin 4 - RESET
*/
#include <SoftwareSerial.h>

0 comments on commit b300ac6

Please sign in to comment.