protostax / protostax_iss_tracker Goto Github PK
View Code? Open in Web Editor NEWProtoStax International Space Station Tracker with ePaper Display and Raspberry Pi
License: BSD 3-Clause "New" or "Revised" License
ProtoStax International Space Station Tracker with ePaper Display and Raspberry Pi
License: BSD 3-Clause "New" or "Revised" License
The default orientation for the display, when attached to a Raspberry Pi puts the power socket of the Pi at the top-right. To make wall mounting the whole thing a bit tidier, would it be possible to have an option to flip the display by 180 degrees. This would mean the power socket would be at the bottom left.
Thanks for this great project, great example of coding for this application! I believe that the logic on when to display the positions
is broken. Here is a patch, iss.patch
that fixes this bug. Thanks again
--- iss.py 2022-03-15 20:04:26.258238672 -0400
+++ iss_new.py 2022-03-15 20:06:34.951525600 -0400
@@ -123,6 +123,7 @@
# Store positions in list
positions = []
+ DISPLAY_REFRESH_INTERVAL_COUNTER = 1
while(True):
t0 = time()
try:
@@ -143,7 +144,7 @@
print(positions)
# Refresh the display on the first fetch and then on every DISPLAY_REFRESH_INTERVAL fetch
- if ((len(positions) >= 1) and ((len(positions)-1) % DISPLAY_REFRESH_INTERVAL)):
+ if (len(positions) == 1 ) or DISPLAY_REFRESH_INTERVAL_COUNTER == DISPLAY_REFRESH_INTERVAL:
epd.init()
(imageBlack, imageRed) = display.drawISS(positions)
# We're drawing the map in black and the ISS location and trajectory in red
@@ -151,6 +152,12 @@
epd.display(epd.getbuffer(imageBlack), epd.getbuffer(imageRed))
sleep(2)
epd.sleep()
+ if (len(positions) > 1):
+ DISPLAY_REFRESH_INTERVAL_COUNTER = 1
+ else:
+ DISPLAY_REFRESH_INTERVAL_COUNTER += 1
+ else:
+ DISPLAY_REFRESH_INTERVAL_COUNTER += 1
t1 = time()
sleepTime = max(DATA_INTERVAL - (t1 - t0), 0)
hello
i don't have a e-paper "screen" but i have a 7 inch raspberry pi touchscreen. Is there any way i can use that to see iss position?
The list of positions can accumulate so many positions that the screen eventually fills up. I noted this on the Hackster project page. I paid a programmer because my Python skills aren't good enough to create the suggested "circular or ring buffer". I'm not sure how to share that code but it seems to be working well on my setup. I'm happy to share the code.
When changing the DISPLAY_REFRESH_INTERVAL to higher value (good idea as the epaper does not appreciate to be refreshed every 30 seconds!) it does not work as there is a mistake in the test line:
if ((len(positions) >= 1) and ((len(positions)-1) % DISPLAY_REFRESH_INTERVAL)):
should be
if ((len(positions) >= 1) and ((len(positions)-1) % DISPLAY_REFRESH_INTERVAL) == 0):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.