Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

19/4/2020 tino / pyfirmata / tests.

py — Bitbucket

Tino de Bruijn / pyFirmata File details


pyFirmata
tests.py Pull requests Check out Last updated
2011‑11‑05
Source SEE GITHUB: github.com/tino/pyFirmata
File type
Python
Commits
Source … 59… Full commit
Lines Size
Branches 303 12.86 KB

Pull requests pyfirmata / tests.py Edit


(p p _ [
254 0 builds
self.assertTrue(len(pins) == len(BOARDS['arduino']['
Downloads 255
256 def test_get_pin_digital(self):
257 pin = self.board.get_pin('d:13:o') Give feedback
258 self.assertEqual(pin.pin_number, 13)
259 self.assertEqual(pin.mode, pyfirmata.OUTPUT)
260 self.assertEqual(pin.port.port_number, 1)
261 self.assertEqual(pin.port.reporting, False)
262
263 def test_get_pin_analog(self):
264 pin = self.board.get_pin('a:5:i')
265 self.assertEqual(pin.pin_number, 5)
266 self.assertEqual(pin.reporting, True)
267 self.assertEqual(pin.value, None)

https://bitbucket.org/tino/pyfirmata/src/599e57b5f400a2e309394f07d1222a31d7f82f96/tests.py 1/1

You might also like