Git Product home page Git Product logo

pico-solar-system's Introduction

Pico Solar System

A miniature device depicting the relative position of the planets in Solar System.

pico

Hardware

  • Raspberry Pi Pico and time source
    • Pico + Precision RTC Module (DS3231)
    • OR Pico W + available Wi-Fi network
  • Pico Display Pack

Software

MicroPython

The software is written in MicroPython 1.19 and uses a custom build from Pimoroni which includes drivers for the display. Download it from the official Pimoroni repository here. Please note that Pico and Pico W require different UF2 files. Here is a direct link for Pico and for Pico W

  1. Download the MicroPython UF2.
  2. Push and hold the BOOTSEL button and plug your Pico into the USB port of your computer. Release the BOOTSEL button after your Pico is connected.
  3. It will mount as a Mass Storage Device called RPI-RP2.
  4. Drag and drop the MicroPython UF2 file onto the RPI-RP2 volume.

rshell

To upload and configure your Pico Solar System you will need to install rshell. Make sure you have pip installed.

pip3 install rshell

Installing Pico Solar System

  1. Download Pico Solar System
git clone https://github.com/dr-mod/pico-solar-system.git
  1. Open the directory with the source code
cd pico-solar-system
  1. (If using Wi-Fi), rename wifi_config_sample.py to wifi_config.py and edit to include your Wi-Fi information

  2. Copy required python files to your pico

rshell
cp *.py /pyboard/
  1. (If using RTC) Set time & configure the RTC module
repl

import time
import ds3231
rtc = ds3231.ds3231()
rtc.set_time(time.time())

To account for a timezone you might want to apply an offset to the UTC timestamp in seconds:

rtc.set_time(time.time() + 60 * 60 * (+ OFFSET_IN_HOURS) )

Case

A 3d printable case for this project can be found here.

A remixed case for the Pico W and display (without the RTC) can be found here.

Support the project

If you would like to support what I do and keep me caffeinated, you can do it here:

"Buy Me A Coffee"

pico-solar-system's People

Contributors

ae5au avatar dr-mod avatar spmfox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pico-solar-system's Issues

Support for MicroPython 1.19 to include Pico W

https://github.com/ae5au/pico-solar-system

I've created a fork with support for the latest Pimoroni build of MicroPython 1.19 including the new PicoGraphics framework. It also supports the Pico W...eventually using ntp to sync time removing the need for an RTC if using somewhere that has Wi-Fi.

Please take a look and let me know if you have a chance to try it out. I have some more changes to make and would like some feedback before submitting a PR.

Requires installing v1.19 or later from Pimoroni:
https://github.com/pimoroni/pimoroni-pico/releases/

Error on soft reboot

Hello,

I do have a DS3231 module, but get this output:

aceback (most recent call last):
File "main.py", line 175, in
File "main.py", line 77, in main
File "ds3231.py", line 19, in init
OSError: [Errno 5] EIO

rtc=ds3231.ds3231()
Traceback (most recent call last):
File "", line 1, in
File "ds3231.py", line 19, in init
OSError: [Errno 5] EIO

Micropython 1.18.1

Just to add, the RTC module is the 'Precision RTC Module for Raspberry Pi Pico (DS3231). https://thepihut.com/products/precision-rtc-module-for-raspberry-pi-pico-ds3231

Many thanks.

3D Print Files

Hello, love the project.

Can you please upload the 3d print files for making the case that was pictured on Reddit?

Thank you.

Getting started

You're going to think I'm really stupid for this one, but here goes!

I've installed the appropriate UF2 onto my Pico W as instructed, and the Pico W is now connected to my Windows PC running Thonny.

So the next inbstructions are to enter the following - but in what program / device / window or whatever am I supposed to enter them??

pip3 install rshell

git clone https://github.com/dr-mod/pico-solar-system.git

cd pico-solar-system

rshell
cp *.py /pyboard/

ESP8266 instead of RTC?

Would it be possible to use an ESP8266 to fetch Internet time instead of using an RTC? I know RTCs are cheap, I'm just looking for projects to do with the kids using the parts I have on hand. My knowledge of this stuff is very limited.

Pico display 2

Hi

this is a great little system. I have a pico display pack 2. and get an error when I change your code in the main.py to try and get the whole thing working on the display pack 2.

the code I change is simply line one to show "from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2, PEN_RGB565"

and line 14 to show "display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, rotate=0, pen_type=PEN_RGB565)"

I then run it all and get

Traceback (most recent call last):
File "", line 14, in
MemoryError: memory allocation failed, allocating 153600 bytes

my micropython is pretty minimal but I am guess ing there is an issue with memory allocation to the DIsplay pack 2 as it is that much bigger for the pico w to run

any hints or ideas would be appreciated

OSError: [Errno 5] EIO - When running rtc.set_time(time.time())

I cannot get the RTC to set the time, I don't know what the issue is.

`Entering REPL. Use Control-X to exit.

MicroPython v1.15 on 2021-05-20; Raspberry Pi Pico with RP2040
Type "help()" for more information.

import time
import ds3231
rtc = ds3231.ds3231()
rtc.set_time(time.time())
Traceback (most recent call last):
File "", line 1, in
File "ds3231.py", line 27, in set_time
OSError: [Errno 5] EIO
`

Not Turning On

Is this supposed to start automatically? For some reason after I did all the steps my screen is still blank. What should I do?

ds3231

I got it working a few months ago and all was good..i updated to the new release uf2. Updated the py scripts. Not able to get it working again. ds3231 inst defined. Using a Pico (no wifi) and a generical DS3231 board wired to i2c (pin 20 and 21).
Tried rshell on ubuntu and Thony on windows.
The REPL comands worked, no errors :)

Traceback (most recent call last):
File "main.py", line 218, in
File "main.py", line 90, in main
File "main.py", line 188, in set_time
"NameError: name 'ds3231' isn't defined"

Any ideas?
Thanks

Sleep, or deepsleep.

20240214_212542
Hey, not an issue..more of a question, build this bad boy.. was asking my self if i could add a sleep function. Its not really long lasting on battery. Maybe a sleep for the display backlight.

Request: Could you provide some more pics of how/where the RTC is attached?

As the title states, I'd love to see how/where you attached the RTC as it was my understanding that the pico display covers all the pins. I've used the pimoroni pico lipo shim and had it in between the pico and the display, but not sure which RTC clock module you are using and how you attached it.

Thanks

How to set UTC offset on Pico W?

Is there a way to set the UTC offset when using NTP instead of RTC? The instructions all reference the RTC module and looking at main.py, i don't see an obvious way to implement it.

Thanks!

Diagram for assembly

Hey, I really liked your project, so i decided to make it but i couldnt find a diagram or a picture on how to assemble the board with the screen and module.

Can you upload a diagram or a picture?

Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.