Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Changes
Page history
Update API
authored
Apr 19, 2019
by
Vince Mulhollon
Show whitespace changes
Inline
Side-by-side
API.md
View page @
3e528703
...
@@ -23,7 +23,22 @@ Example:
...
@@ -23,7 +23,22 @@ Example:
<pre>
<pre>
(seesaw:digital-read-p 'PA10)
(seesaw:digital-read-p 'PA10)
</pre>
</pre>
Would read pin PA10 and if logical high "1" would return T, otherwise return nil..
Would read pin PA10 and if logical high "1" would return T, otherwise return nil.
## seesaw:digital-write
Writes a bit to GPIO returning a T or NIL.
Note, you should set the pin direction to output, before writing.
Output is set to binary one for 'set 'on 'h and 'high.
Output is set to binary zero for 'clr 'off 'l and 'low.
Parameters:
<pre>
(seesaw:digital-write pin state)
</pre>
Example:
<pre>
(seesaw:digital-write 'PA27 'on)
</pre>
Would light the active-high LED on the adafruit seesaw breakout board, assuming PA27 had previously been set to output.
## seesaw:id-read
## seesaw:id-read
Read the hardware ID of the chip, which should always be 0x55 aka 85 decimal. Parameters:
Read the hardware ID of the chip, which should always be 0x55 aka 85 decimal. Parameters:
...
...
...
...