
0
to
255
Basic Read
Below, is a simple example of how to take simple measurements from the sensor. To use this example, there are
multiple options for accessing the
.hex
file:
Replicate the block functions from the display below to copy the example project. Then download the
.hex
file.
Expand the display widow to pull up the example project. Then download the
.hex
file.
Use this link to pull up the example project. Then download the
.hex
file.
Download the
.hex
file from the button below or the link on the bottom of the display.
DOWNLOAD .HEX FILE FOR EXAMPLE
The output is redirected over the serial port to avoid conflicts on pins
P0
and
P1
, which are also used for serial
communication. To read the sensor values, pull up your favorite serial terminal emulator. Then, connect to the
serial port that the micro:bit is on; the default baud rate is 115200 bps. Below, is an example of the sensor output
for the example code.
serial redirect to USB
initialize gator:Particle sensor
on start
join
Particle =
"
"
get
red
value
Heart Rat
"
serial write line
forever
Microsoft MakeCode Terms of Use Privacy
Download
Edit
Simulator
Blocks
JavaScript
Program Error: Cannot read property 'begin' of unde ned
This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this
use.