A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://gist.github.com/MrYsLab/df8ec22ea16de6c84d67 below:

pymata_aio_core_example · GitHub

Last active October 3, 2015 02:19

Clone this repository at <script src="https://gist.github.com/MrYsLab/df8ec22ea16de6c84d67.js"></script>

Save MrYsLab/df8ec22ea16de6c84d67 to your computer and use it in GitHub Desktop.

pymata_aio_core_example

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters #!/usr/bin/env python3 from pymata_aio.pymata_core import PymataCore from pymata_aio.constants import Constants import asyncio @asyncio.coroutine def pin_6_pwm_128(my_board): """ Set digital pin 6 as a PWM output and set its output value to 128 @param my_board: A PymataCore instance @return: No Return Value """ # set the pin mode yield from my_board.set_pin_mode(6, Constants.PWM) # set the pin to 128 yield from my_board.analog_write(6, 128) # let the led stay lit for 3 seconds yield from asyncio.sleep(3) # shutdown yield from my_board.shutdown() # create a PyMataCore instance and complete the initialization with a call to start() board = PymataCore() board.start() # get the loop, and execute pin6_pwm_128 loop = asyncio.get_event_loop() loop.run_until_complete(pin_6_pwm_128(board))

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4