This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import datetime | |
from Hologram.HologramCloud import HologramCloud | |
retvalue = "NA" | |
i=1 | |
def holo_heartbeat(): | |
recv = hologram.sendMessage("!", topics=["heartbeat","pigate"]) | |
time.sleep(5) # give it time to think about it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ConfigParser | |
# load external configuration settings | |
configParser = ConfigParser.RawConfigParser() | |
configFilePath = r'config.txt' | |
try: | |
configParser.read(configFilePath) | |
max_storage = float(configParser.get('Personalized', 'max_storage')) | |
my_IP = configParser.get('Personalized', 'IP') | |
print("Configuration settings read correctly. IP:",my_IP," Capacity: ", max_storage) | |
except ConfigParser.Error: |