OPi.GPIO | GPIO drop-in replacement library
kandi X-RAY | OPi.GPIO Summary
kandi X-RAY | OPi.GPIO Summary
RPi.GPIO drop-in replacement library for Orange Pi Zero and other SBCs
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Wait for an edge
- Check that the channel is configured
- Set duty cycle
- Blocks until the given path is available
- Get GPIO input
- Get the value for a given pin
- Set the frequency for the given pin
- Enables PWM
- Disable PWM
- Close the GPIO pin
- Stop the pin
- Start the duty cycle
- Join the worker
- Enable the polarity of the pin
- Set duty cycle
- Removes an edge detection from the GPIO pin
- Set the polarization of the pin
- Add an edge callback
- Set the pin mode
- Return whether the GPIO pin is detected
- Start the event loop
- Add an edge detection
- Change the duty cycle
OPi.GPIO Key Features
OPi.GPIO Examples and Code Snippets
Community Discussions
Trending Discussions on OPi.GPIO
QUESTION
I'm a noob and new to web-development and i'm overwhelmed with the multitude of languages. I got the basic understanding on whats going on but I still don't know where I am getting stuck.
I have a DS18B20 connected to my Raspberry Pi and I am able to fetch the temperature in the terminal. I am running the WebIOPi successfully as well and able to see the temperature in its default web page under Devices. So I was hoping to create my own web page that would do the exact same thing with other options for future. I got a hold of some tutorials on WebIOPi and i got 4 files. An HTML file, the JavaScript file, the CSS file and a Python file. In my understanding the HTML file contains the logic and links to other things like clickable buttons and backgrounds etc. The CSS file contains the background and maybe text, the JavaScript file contains animation and buttons? Here I get confused. Last but not least the Python file is what runs the code that contains sensor model and libraries. I configured the Webiopi config file with my sensors serial number as mentioned here: http://webiopi.trouch.com/OneWireTemp.html. I am loosely trying to follow this tutorial where I got most parts of the code: http://webiopi.trouch.com/Tutorial_Devices.html.
Now when I log into the webpage from my browser the background is displayed correctly, but nothing else. There is no box or button showing the temperature. Pictures are attached. I was hoping for a button like attached in the picture.
Any guidance or help would be appreciated!
index.html
...ANSWER
Answered 2017-Jan-03 at 08:41I do not know about your specific case, but to me it seems quite obvious that there is nothing to see here. You have been mixing up things quite a bit.
To clarify things
- The HTML contains the logical structure of your website
- the CSS contains the look and feel (design)
- the JavaScript and the Python files contain (UI)-Logic
This is quite coarse and might deviate, but it should suffice as a start and should apply here.
The obvious errors in your code
- The HTML file is incomplete. It should not stop in the middle of the
script
-section, there should be markup defining the buttons you want to display. Currently there is none, hence there is nothing to see (but the HTMl-body, which is added automatically - and since the background color is defined for the body it is displayed) - The JavaScript file does not actually contain JavaScript, but HTML, which is most likely not correct
- At the moment all your JavaScript is located within the script-section of your HTML file. This is fine as long as your are just trying to work it out, but renders a separate JS-file useless at the moment.
All in all your HTML file should look more like this.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install OPi.GPIO
You can use OPi.GPIO like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page