Open vnprak opened 3 years ago
The current implementation with the stub functions doesn't run - there's a syntax error. The library and the demo file that calls library functions should always be left in a working, running state.
To test, install library and run demo.py:
sudo python3 setup.py install
python3 demo.py
(and show the output here!)
The current implementation with the stub functions doesn't run - there's a syntax error. The library and the demo file that calls library functions should always be left in a working, running state.
To test, install library and run demo.py:
sudo python3 setup.py install python3 demo.py
(and show the output here!)
Current status - when you run the install, it fails with reference to syntax error:
running install
running bdist_egg
running egg_info
writing risk.egg-info/PKG-INFO
writing dependency_links to risk.egg-info/dependency_links.txt
writing top-level names to risk.egg-info/top_level.txt
reading manifest file 'risk.egg-info/SOURCES.txt'
writing manifest file 'risk.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv6l/egg
running install_lib
running build_py
creating build/bdist.linux-armv6l/egg
copying build/lib/risk.py -> build/bdist.linux-armv6l/egg
byte-compiling build/bdist.linux-armv6l/egg/risk.py to risk.cpython-37.pyc
File "build/bdist.linux-armv6l/egg/risk.py", line 22
def text_to_display(text)
^
SyntaxError: invalid syntax
creating build/bdist.linux-armv6l/egg/EGG-INFO
copying risk.egg-info/PKG-INFO -> build/bdist.linux-armv6l/egg/EGG-INFO
copying risk.egg-info/SOURCES.txt -> build/bdist.linux-armv6l/egg/EGG-INFO
copying risk.egg-info/dependency_links.txt -> build/bdist.linux-armv6l/egg/EGG-INFO
copying risk.egg-info/top_level.txt -> build/bdist.linux-armv6l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/risk-1.0-py3.7.egg' and adding 'build/bdist.linux-armv6l/egg' to it
removing 'build/bdist.linux-armv6l/egg' (and everything under it)
Processing risk-1.0-py3.7.egg
Removing /usr/local/lib/python3.7/dist-packages/risk-1.0-py3.7.egg
Copying risk-1.0-py3.7.egg to /usr/local/lib/python3.7/dist-packages
risk 1.0 is already the active version in easy-install.pth
Installed /usr/local/lib/python3.7/dist-packages/risk-1.0-py3.7.egg
Processing dependencies for risk==1.0
Finished processing dependencies for risk==1.0
and then when you run the demo.py
, it fails on the import:
Traceback (most recent call last):
File "demo.py", line 1, in <module>
import risk
File "/home/pi/sp21/Online-Risk/risk.py", line 22
def text_to_display(text)
^
SyntaxError: invalid syntax
The current implementation with the stub functions doesn't run - there's a syntax error. The library and the demo file that calls library functions should always be left in a working, running state.
To test, install library and run demo.py:
sudo python3 setup.py install python3 demo.py
(and show the output here!)
Fixed in https://github.com/vnprak/Online-Risk/commit/4f16b19875cb3d4ba5e98ce41c40ba56089d3a02
Figure out and list potential functions that the project would implement:
detect_tag
read_tag
display_on
display_off
clear_display
text_to_display
i2c_send_output
(accepts i2c multiplexer address and pattern to send to the output lines)i2c_read_input
(accepts i2c multiplexer address and returns pattern read from inputs)buzz
(accepts duration)