Guest User

Untitled

a guest
Feb 23rd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. def do_start():
  2. spi.open(0,0)
  3. ch0 = [0x0c,0x00,0x00]
  4. a = adc(ch0)
  5. b = a[1]
  6. b = b&0b00001111
  7. c = a[2]
  8.  
  9. value = c+256*b
  10. voltage = value/4096*5
  11. zeit = millis()
  12. voltage = round(voltage,2)
  13. data=[voltage,zeit]
  14.  
  15.  
  16. with open(csvfilesave,"a") as output:
  17. writer = csv.writer(output, delimiter=",",lineterminator = 'n')
  18. writer.writerow(data)
  19. root.after(100, do_start)
  20.  
  21. Exception in Tkinter callback
  22. Traceback (most recent call last):
  23. File "/usr/lib/python3.5/tkinter/__init__.py", line 1562, in __call__
  24. File "/usr/lib/python3.5/tkinter/__init__.py", line 608, in callit
  25. File "/home/pi/Documents/loggerprojekt/gui.py", line 34, in do_start
  26. OSError: [Errno 24] Too many open files
Add Comment
Please, Sign In to add comment