PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Robots
ActivityBot
Test Encoder Connections.c
1
/*
2
Test Encoder Connections.c
3
4
Load to ActivityBot EEPROM. PWR to Position 2.
5
Gently turn each wheel by hand. Right wheel
6
blinks P27 LED, left wheel blinks P26 LED.
7
If not, encoders are not seeing wheel spokes.
8
Go to Extras/Troubleshooting section of tutorial.
9
10
http://learn.parallax.com/activitybot/test-encoder-connections
11
*/
12
13
#include "
simpletools.h
"
14
15
int
main
()
16
{
17
low
(26);
18
low
(27);
19
while
(1)
20
{
21
set_output
(26,
input
(14));
22
set_output
(27,
input
(15));
23
}
24
}
25
low
void low(int pin)
Set an I/O pin to output-low.
Definition:
low.c:19
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
main
int main(void)
Definition:
GraphicsTest.c:20
input
int input(int pin)
Set an I/O pin to input and return 1 if pin detects a high signal, or 0 if it detects low.
Definition:
input.c:19
set_output
void set_output(int pin, int state)
Set I/O pin output register bit to either 1 or 0.
Definition:
setOutput.c:19
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17