Activities/Turtle Art/Programmable Brick: Difference between revisions

Tonyforster (talk | contribs)
Tonyforster (talk | contribs)
Line 213: Line 213:
   fd =open(devicestr, 'rb')
   fd =open(devicestr, 'rb')
   for x in range(12):
   for x in range(12):
       fd.read(1)
       fd.read(1)                             #does not return till the switch state changes
   tw.lc.heap.append( ord(fd.read(1)))        #do not return till the switch state changes
   tw.lc.heap.append( ord(fd.read(1)))        #push ebook switch state to heap
   fd.close
   fd.close