Skip to content

Commit ce0cca6

Browse files
author
dcyoung
committed
Added troubleshooting info to example sketch
1 parent f3400d1 commit ce0cca6

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

Sweep/Examples/MegaSerialPrinter/MegaSerialPrinter.ino

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@
44
55
MegaSerialPrinter:
66
- Example sketch for using the Scanse Sweep with the Arduino Mega 2560.
7-
- Collects at least 3 complete scans, and then prints the sensor readings
7+
Collects at least 3 complete scans, and then prints the sensor readings
88
- Assumes Sweep sensor is physically connected to Serial #1 (RX1 & TX1)
99
- For the sweep's power, ground, RX & TX pins, follow the connector
1010
pinouts in the sweep user manual located here:
1111
http://scanse.io/downloads
1212
- Be sure to connect RX_device -> TX_arduino & TX_device -> RX_arduino
13-
- If the arduino is running off USB power alone, the quantity and
14-
quality of sensor readings will drop
13+
- The sketch WILL work with the arduino running off USB power alone,
14+
however, the quantity and quality of sensor readings will drop.
15+
- The behavior of the sketch can be unreliable with both USB & powerjack
16+
powering the arduino. If the sketch doesn't seem to to work with both
17+
connected, try following sequence:
18+
- upload the sketch
19+
- unplug the USB connector
20+
- unplug/remove power to the power jack
21+
- plug in the USB connector
22+
- open the serial terminal from the arduino IDE
23+
- plug in the power to the power jack
24+
- send "start" over serial
1525
1626
Created by David C. Young, February 21, 2017.
1727
Released into the public domain.
@@ -127,8 +137,8 @@ bool adjustDeviceSettings()
127137
// Set the motor speed to 5HZ (codes available from 1->10 HZ)
128138
bool bSuccess = device.setMotorSpeed(MOTOR_SPEED_CODE_5_HZ);
129139
Serial.println(bSuccess ? "\nSuccessfully set motor speed." : "\nFailed to set motor speed");
130-
131-
/*
140+
141+
/*
132142
// Device will always default to 500HZ scan rate when it is powered on.
133143
// Snippet below is left for reference.
134144
// Set the sample rate to 500HZ (codes available for 500, 750 and 1000 HZ)

0 commit comments

Comments
 (0)