updated and added README with images
This commit is contained in:
		
							parent
							
								
									4c11f7fc4b
								
							
						
					
					
						commit
						ee34951ca6
					
				
							
								
								
									
										56
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,56 @@ | ||||
| # Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos | ||||
| # Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos | ||||
| 
 | ||||
| ### macOS ### | ||||
| # General | ||||
| .DS_Store | ||||
| .AppleDouble | ||||
| .LSOverride | ||||
| 
 | ||||
| # Icon must end with two \r | ||||
| Icon | ||||
| 
 | ||||
| 
 | ||||
| # Thumbnails | ||||
| ._* | ||||
| 
 | ||||
| # Files that might appear in the root of a volume | ||||
| .DocumentRevisions-V100 | ||||
| .fseventsd | ||||
| .Spotlight-V100 | ||||
| .TemporaryItems | ||||
| .Trashes | ||||
| .VolumeIcon.icns | ||||
| .com.apple.timemachine.donotpresent | ||||
| 
 | ||||
| # Directories potentially created on remote AFP share | ||||
| .AppleDB | ||||
| .AppleDesktop | ||||
| Network Trash Folder | ||||
| Temporary Items | ||||
| .apdisk | ||||
| 
 | ||||
| ### macOS Patch ### | ||||
| # iCloud generated files | ||||
| *.icloud | ||||
| 
 | ||||
| ### VisualStudioCode ### | ||||
| .vscode/* | ||||
| !.vscode/settings.json | ||||
| !.vscode/tasks.json | ||||
| !.vscode/launch.json | ||||
| !.vscode/extensions.json | ||||
| !.vscode/*.code-snippets | ||||
| 
 | ||||
| # Local History for Visual Studio Code | ||||
| .history/ | ||||
| 
 | ||||
| # Built Visual Studio Code Extensions | ||||
| *.vsix | ||||
| 
 | ||||
| ### VisualStudioCode Patch ### | ||||
| # Ignore all local history of files | ||||
| .history | ||||
| .ionide | ||||
| 
 | ||||
| # End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos | ||||
							
								
								
									
										13
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							| @ -1,13 +0,0 @@ | ||||
| { | ||||
|     "python.languageServer": "Pylance", | ||||
|     "python.linting.pylintEnabled": false, | ||||
|     "python.analysis.diagnosticSeverityOverrides": { | ||||
|         "reportMissingModuleSource": "none" | ||||
|     }, | ||||
|     "python.analysis.extraPaths": [ | ||||
|         "", | ||||
|         "/Users/peter/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.19-darwin-x64/stubs", | ||||
|         "/Users/peter/Library/Application Support/Code/User/globalStorage/joedevivo.vscode-circuitpython/bundle/20220820/adafruit-circuitpython-bundle-py-20220820/lib" | ||||
|     ], | ||||
|     "circuitpython.board.version": null | ||||
| } | ||||
| @ -1,11 +1,9 @@ | ||||
| def connect(): | ||||
|     import network | ||||
|     from time import sleep_ms | ||||
|     from time import sleep, sleep_ms | ||||
|   | ||||
|     ssid = "-Netzlein-" | ||||
|     password = "Lau5Buam!" | ||||
|     #ssid = "Phaser" | ||||
|     #password = "toolbelt555" | ||||
|     ssid = "YourSSID" | ||||
|     password = "totallysecurepassword" | ||||
| 
 | ||||
|     print("Connecting to WiFi") | ||||
|   | ||||
|  | ||||
							
								
								
									
										22
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | ||||
| # ESP8266 Thermometer with OLED display | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ## Hardware | ||||
| - ESP-12F, WiFi Module Based on ESP8266 (preferrably with breakout board) | ||||
| - SSD1306 128 x 64 Dot Matrix OLED with Controller | ||||
| - DS1820 parasitic power 1-Wire temperature sensor | ||||
| 
 | ||||
| ## Features | ||||
| - Connects to Wifi | ||||
| - Gets outside temperature via openweathermap | ||||
| - Gets inside temperature via DS1820 temperature sensor | ||||
| - Plots both temperatures against each other | ||||
| - Handles Wifi and service outages gracefully | ||||
| - Handles possible collisions of temperature labels | ||||
| 
 | ||||
| ## Images | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										
											BIN
										
									
								
								images/board.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/board.jpg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 1.7 MiB | 
							
								
								
									
										
											BIN
										
									
								
								images/display.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/display.jpg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 1.7 MiB | 
							
								
								
									
										
											BIN
										
									
								
								images/outage.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/outage.jpg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 1.5 MiB | 
							
								
								
									
										
											BIN
										
									
								
								images/plot.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/plot.jpg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 1.7 MiB | 
							
								
								
									
										
											BIN
										
									
								
								images/thermometer.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/thermometer.jpg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 331 KiB | 
							
								
								
									
										23
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								main.py
									
									
									
									
									
								
							| @ -2,7 +2,7 @@ | ||||
| 
 | ||||
| from machine import Pin, I2C | ||||
| import ssd1306 | ||||
| from time import sleep_ms | ||||
| from time import sleep, sleep_ms | ||||
| import onewire, ds18x20 | ||||
| import urequests | ||||
| import ConnectWiFi | ||||
| @ -45,23 +45,6 @@ outer_templog = [] | ||||
| refresh_counter = 1 | ||||
| burn_in_counter = 0 | ||||
| 
 | ||||
| """ | ||||
| def rand( floor, mod=0, negative = False): | ||||
|     # return random value from -floor.mod to floor.mod if negative is True | ||||
| 
 | ||||
|     from os import urandom as rnd | ||||
| 
 | ||||
|     sign = 1 if ord(rnd(1))%10 > 5 else -1 | ||||
|     sign = sign if negative else 1 | ||||
| 
 | ||||
|     if mod: | ||||
|         value = float(('{}.{}').format(ord(rnd(1))%floor, ord(rnd(1))%mod)) | ||||
|     else: | ||||
|         value = int(('{}').format(ord(rnd(1))%floor)) | ||||
| 
 | ||||
|     return sign*value | ||||
| """ | ||||
| 
 | ||||
| def cleanedlist(list): | ||||
|     return [i for i in list if i != errortemp] | ||||
| 
 | ||||
| @ -210,7 +193,7 @@ def refresh_outer(): | ||||
|      | ||||
|     if connection_success: | ||||
|         try: | ||||
|             response = urequests.get('http://api.openweathermap.org/data/2.5/weather?zip=79106,de&appid=50fdc9dbace8903dae0ac4ee4143b3b5') | ||||
|             response = urequests.get('http://api.openweathermap.org/data/2.5/weather?zip=---your-zip---,de&appid=---your-app-id---') | ||||
|             parsed = response.json() | ||||
| 
 | ||||
|             if 'cod' in parsed: | ||||
| @ -284,7 +267,7 @@ while True: | ||||
|     do_refresh_outer = False | ||||
| 
 | ||||
|     ds18b20.convert_temp() # refresh value ahead of time for minimum latency | ||||
|     sleep_ms(1000) # refresh inner temp every second | ||||
|     sleep(1) # refresh inner temp every second | ||||
| 
 | ||||
|     print('.', end='') | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user