Skip to content

Commit 12c4b1f

Browse files
authored
added troubleshoot instructions and changed md formatting
1 parent bc09841 commit 12c4b1f

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ MicroPython-Examples
33

44
This repo features examples for MicroPython similar to Arduino.
55

6+
### Troubleshooting
7+
8+
__Safe Mode__
9+
Hold down USR switch and quickly press and release RST switch. Release USR switch when only the orange LED is lit. The orange LED will flash quickly 4 times and stop. This is safe mode, which ignores boot.py and main.py. It might be helpful if something is running on the pyboard and that's preventing you from changing its contents.
10+
11+
__Factory Reset__
12+
Hold down USR switch and quickly press and release RST switch. Release USR switch when both orange and green LEDs are lit. Both those LEDs will flash 4 times and stop. The board will now be factory reset.
13+
14+
615
### 00.Basics
716

817
__boot.py__
@@ -16,7 +25,7 @@ REPL stands for Read-Eval-Print-Loop.
1625
Very important and highly useful feature that allows easy debugging and quick learning.
1726
All examples can be tested on the board without having to manually upload every time.
1827

19-
====================
28+
---
2029

2130
### 01.LEDs
2231

@@ -38,7 +47,7 @@ Something more interesting that simple blinks
3847
__heartbeatFade__
3948
Similar to previous 'Heartbeat' script, but fades the light in and out instead of just switching on and off
4049

41-
====================
50+
---
4251

4352
### 02.Inputs
4453

@@ -54,16 +63,16 @@ Simple demo of the Switch object that can control the inbuilt USR button on the
5463
__switchCallback__
5564
Example of the Switch.callback function (uses interrupts)
5665

57-
====================
66+
---
5867

5968
### 03.Pins
6069

6170
__PinsBasicOutput__
6271
Example of using on of the pins to control an output (LED, motor, buzzer, relay, et al)
6372

64-
====================
73+
---
6574

66-
###04.Accelerometer
75+
### 04.Accelerometer
6776

6877
__accelerometerControlLED__
6978
Controls blink speed of an LED using the accelerometer's value along the X axis
@@ -72,7 +81,7 @@ This script also features a custom remap() function that remaps a value to diffe
7281
__accelerometer__
7382
Prints the x,y,z values of the accelerometer every second (REPL required)
7483

75-
====================
84+
---
7685

7786
### 05.Servos
7887

@@ -82,14 +91,14 @@ Example of setting a servo's angle, and animating it over time
8291
__ServoGetAngle__
8392
Generates a random number roughly between -90 and 90, and sets it as the servo's angle. The servo's angle is then obtained from the object
8493

85-
====================
94+
---
8695

8796
### 06.Clock
8897

8998
__clock__
9099
Uses the RTC (independent Real Time Clock) in the pyboard. Prints the time and date with delay of 100 microseconds. Start time is set with variables.
91100

92-
====================
101+
---
93102

94103
### 07.Mouse
95104

@@ -99,14 +108,14 @@ Sets the device as a HID when it boots.
99108
__main.py__
100109
Control cursor with the pyboard's accelerometer. The USR switch is used as the button. Hold the board such that side with the microUSB port points to the direction you face.
101110

102-
====================
111+
---
103112

104113
### 08.Sensors
105114

106115
__HC-SR04__
107116
Prints distance values in cm and inches from two ultrasonic sensors connected to the pyboard. Uses the ultrasonic module available [here](https://github.com/mithru/MicropythonLibs/tree/master/Ultrasonic) and [here](https://github.com/skgsergio/MicropythonLibs/tree/master/Ultrasonic).
108117

109-
====================
118+
---
110119

111120
Contributions include code from:
112121
[Mithru Vigneshwara](https://github.com/mithru/MicroPython-Examples/)

0 commit comments

Comments
 (0)