1
0
Fork 0
Browse Source

comment out testing/debugging print states in cli_meter.

pull/1/head
Craig Oates 4 years ago
parent
commit
b0d6474809
  1. 2
      README.md
  2. 4
      cli_meter.py

2
README.md

@ -77,7 +77,7 @@ You can set the Pi up to automatically login to the desktop but the recommended
#### Network Connections
Before installing the Raspberry Pi in its final location (gallery/exhibition), make sure it can connect to the galleries internet -- either via wi-fi or Ethernet cable. If you use an Ethernet cable, you do not need to do anything, but the wi-fi requires a little work on the command-line (if you are using a "headless" version of Rasbpian). If you are unsure how to connect to a router via wi-fi, use the following link to learn how:
Before installing the Raspberry Pi in its final location (gallery/exhibition), make sure it can connect to the galleries internet -- either via wi-fi or Ethernet cable. If you use an Ethernet cable, you do not need to do anything, but the wi-fi requires a little work on the command-line (if you are using a "headless" version of Raspbian). If you are unsure how to connect to a router via wi-fi, use the following link to learn how:
- [Raspbian Wi-Fi Tutorial](https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md)

4
cli_meter.py

@ -78,13 +78,13 @@ def push_reading(lvalue):
time = get_timestamp()
headers = {"content-type": "application/json"}
payload = { "reading": int(lvalue), "time": time, "token": "QWERTYuiopasdfghjklzxcvbnm_1234567890"}
print(payload)
# print(payload) # For testing.
res = requests.post(api_url, data=json.dumps(payload), headers=headers)
def update_reading():
light = light_from_r(read_resistance())
reading_str = "{:.0f}".format(light)
print(reading_str)
# print(reading_str) # For testing.
push_reading(light)
def main():