diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/conwaylife.py | 6 | ||||
-rw-r--r-- | examples/mandel.py | 3 | ||||
-rw-r--r-- | examples/pyb.py | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/examples/conwaylife.py b/examples/conwaylife.py index 7c6ac4d548..89ef94c8c6 100644 --- a/examples/conwaylife.py +++ b/examples/conwaylife.py @@ -1,3 +1,7 @@ +#import essential libraries +import lcd +import pyb + # do 1 iteration of Conway's Game of Life def conway_step(): for x in range(128): # loop over x coordinates @@ -37,8 +41,6 @@ def conway_go(num_frames): pyb.delay(300) # PC testing -import lcd -import pyb lcd = lcd.LCD(128, 32) conway_rand() conway_go(1000) diff --git a/examples/mandel.py b/examples/mandel.py index d2b34fff83..bbb8086470 100644 --- a/examples/mandel.py +++ b/examples/mandel.py @@ -3,10 +3,9 @@ try: except: pass - def mandelbrot(): # returns True if c, complex, is in the Mandelbrot set - @micropython.native + #@micropython.native def in_set(c): z = 0 for i in range(40): diff --git a/examples/pyb.py b/examples/pyb.py index f7b52a2a1e..65fed6647e 100644 --- a/examples/pyb.py +++ b/examples/pyb.py @@ -1,9 +1,9 @@ # pyboard testing functions for CPython import time - def delay(n): - time.sleep(float(n) / 1000) + #time.sleep(float(n) / 1000) + pass rand_seed = 1 def rand(): |