dr-mod / little-sun-gazer

A Raspberry Pi Based Sun Tracker
GNU General Public License v3.0
370 stars 22 forks source link

What do I need to build this project? #1

Open mix3d opened 2 years ago

mix3d commented 2 years ago

Just a simple Q, but if I wanted to recreate this, what kind of a build environment do I need? Awesome project!

mix3d commented 2 years ago

Found the build chain docs on RaspberryPi.org. Ignore me!

mix3d commented 2 years ago

Spent the last several hours getting my build tools setup, but I still feel like I'm missing something. I can build the example pico files from their repo, but am I missing a CMakeLists.txt somehow?

chriszylstra commented 2 years ago

@mix3d I have spent a few hours trying to build this project and have been unsuccessful as well. I think we would appreciate if @dr-mod could give an explaination of how we can build/run this on our own Pi Pico

Thanks :) -cz

marcus-e-e commented 2 years ago

I have never toucht c++ and am not a programmer. But I managed to get it wokring after several weeks of learning and trial and error.

This is what I did:

Added /Fonts and /Config from here: https://github.com/waveshare/Pico_ePaper_Code/tree/main/c/lib I commented out where font48 was used because I have not yet found one.

I added "pico_sdk_import.cmake" (probably not needed)

And this is my CMAkeList.txt file. There are probably things in there that are not needed.

cmake_minimum_required(VERSION 3.16.3)

# Pull in SDK (must be before project)
include(pico_sdk_import.cmake)
include(pico_extras_import.cmake)

project(little-sun-gazer)

pico_sdk_init()

add_subdirectory(ds3231)
add_subdirectory(Fonts)
add_subdirectory(Config)

include_directories(./utils)
include_directories(./ds3231)
include_directories(./Config)

add_executable(little-sun-gazer main.cpp)

pico_add_extra_outputs(little-sun-gazer)

target_link_libraries(little-sun-gazer
    ds3231
    pico_stdlib
    Fonts
    hardware_rtc
    hardware_sleep
    hardware_i2c
    hardware_adc
    hardware_spi
)

I hope it helps @mix3d and @chriszylstra

jklap commented 8 months ago

You can try Font48 from here: https://github.com/ThomasVon2021/blikvm/blob/c29c636349330c0ecff6fb90e0367b6364ca2df0/third_lib/SPI_LCD/Fonts/font48.c