-
Shop
Expansion Boards by Type
Mounting Kits
Writepin()
1 Views - Created 07/09/2023
07/09/2023
Posted by:
Woto
I am new here and I am trying to switch an output with the writepin() function. My question is, does the output have to be written to constantly with writepin(1,0)?
Or is it enough that the command is executed once until it is switched off with another command writepin(1,1)?
Many greetings
Woto
Once you have sent a command to the IO Pi it will keep the same state until another command is sent.
The python library will set the pins as inputs when an IOPi object is initialised so if your program restarts it will set any outputs to be inputs. To stop this you can set the initialise parameter to false when you create an IOPi object.
bus = IOPi(0x20, false)
07/09/2023
Posted by:
Woto
Thank you very much for your answer. It helps me a lot.
Many greetings
Woto
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.
Formatting your Forum Post
This forum uses BBCode, short for Bulletin Board Code, which is a lightweight markup language used primarily in online forums and message boards to format and structure posts. It provides a simple way for users to add formatting and styling to their text without requiring knowledge of HTML or other complex programming languages. With BBCode, users can enhance their messages by applying formatting tags such as bold or italic. Additionally, BBCode allows users to insert images, create clickable links, quote other users, and more.
Type | Syntax | Purpose |
---|---|---|
Bold | [b]{text}[/b] | Makes {text} bold |
Italic | [i]{text}[/i] | Makes {text} italic |
Quote | [quote]{text}[/quote] | Creates a quotation box saying {text} |
Image | [img]{url}[/img] | Shows the image indicated by {url} |
Link | [url]{url}[/url] | Makes a link to {url} |