Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: gavinmc42 on September 11, 2015, 04:23:35 AM

Title: Micropython + webserver + GPIO
Post by: gavinmc42 on September 11, 2015, 04:23:35 AM
Got the example Micropython webserver going.
Figured out the HTML code goes in the CONTENT comment section.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>RF cage stepper motor controller</title>
</head>
<body>
<br>
<button onclick="Stepforwards()" id=stepc >Step Clockwise</button>
<button onclick="Stepbackwards()" id=stepa  >Step Anticlockwise</button>
</body>

Now how do I get the buttons to do stuff?
Turn GPIO on/off would be cool via file writing to /sys/class/gpio/gpioxx/value.
Using no libraries?




Title: Re: Micropython + webserver + GPIO
Post by: vinikon on February 21, 2018, 09:01:45 AM
Did you manage to control GPIO via WEB interface?