Tobias Müller vor 10 Monaten
Ursprung
Commit
513f4fd955

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+.vscode
+.picowgo

BIN
Core/Micro_Python_Firmware_Pico.uf2


BIN
Core/Micro_Python_Firmware_Pico_W_WiFi.uf2


BIN
Core/Micro_Python_Firmware_Pico_W_WiFi_BLE.uf2


Datei-Diff unterdrückt, da er zu groß ist
+ 11 - 0
Core/README.md


BIN
Docs/Datasheets/Maker_Pi_Pico_Datasheet.pdf


BIN
Docs/Datasheets/RP2040_Datasheet.pdf


BIN
Docs/Datasheets/Raspberry_Pi_Pico_Datasheet.pdf


BIN
Docs/Datasheets/Raspberry_Pi_Pico_W_Datasheet.pdf


BIN
Docs/Getting_Started/Connecting_to_Internet_Pico_W.pdf


BIN
Docs/Getting_Started/Getting_started_with_Pico.pdf


BIN
Docs/Hardware/Design/Hardware_Design_RP2040.pdf


BIN
Docs/Hardware/Pinout/Maker_Pi_Pico_Pinout.pdf


BIN
Docs/Hardware/Pinout/Raspberry_Pi_Pico_Pinout.pdf


BIN
Docs/Hardware/Pinout/Raspberry_Pi_Pico_W_Pinout.pdf


BIN
Docs/Hardware/Schematics/Maker_Pi_Pico_Schematic.pdf


BIN
Docs/Hardware/Schematics/Raspberry_Pi_Pico_Schematic.pdf


BIN
Docs/Hardware/Schematics/Raspberry_Pi_Pico_W_Schematic.pdf


+ 3 - 0
Docs/README.md

@@ -0,0 +1,3 @@
+# Documentations
+
+Contains documentations of the Raspberry Pi Pico.

BIN
Docs/Software_Development_Kit/Raspberry_Pi_Pico_C_SDK.pdf


BIN
Docs/Software_Development_Kit/Raspberry_Pi_Pico_Python_SDK.pdf


+ 61 - 0
Libs/LCD_Shield/__init__.py

@@ -0,0 +1,61 @@
+"""
+Author:     Tobias Müller
+Date:       30.06.2023
+Version:    1.0
+
+This file contains classes for LCD, Button and Led control.
+"""
+
+##############################                Modules                 ##############################
+
+from time import sleep_us
+from machine import Pin, PWM, I2C
+
+##############################                  Code                  ##############################
+
+class LCD:
+
+    ##############################           Attributes           ##############################
+
+    __lcd_setting = {}
+
+    ##############################           Constructor          ##############################
+
+    def __init__(self):
+
+        self.__lcd_brightness = self.__check_lcd_brightness(100)
+
+    ##############################           Properties           ##############################
+
+    @property
+    def lcd_brightness(self):
+        return self.__lcd_brightness
+
+    @lcd_brightness.setter
+    def lcd_brightness(self, value: int):
+        self.__lcd_brightness = self.__check_lcd_brightness(value)
+        self.__set_lcd_brightness()
+
+    ##############################         Methods private        ##############################
+
+    @staticmethod
+    def __check_lcd_brightness(value):
+        if not isinstance(value, int):
+            raise ValueError(f"Value \"{value}\" for \"lcd_brightness\" is not type \"int\"!")
+        elif value < 0 or value > 100:
+            raise ValueError(f"Value \"{value}\" for \"lcd_brightness\" is out of range!")
+        else:
+            return value
+
+    def __set_lcd_brightness(self):
+        pass
+
+    ##############################         Methods public         ##############################
+
+    def change_I2C_port(self, SDA_Pin, SCL_Pin):
+        pass
+
+
+if __name__ == "__main__":
+    pass
+

+ 3 - 0
Libs/README.md

@@ -0,0 +1,3 @@
+# Libraries
+
+Contains user defined libraries and modules, which can be used inside of the main program.

+ 1 - 0
Libs/__init__.py

@@ -0,0 +1 @@
+from Libs import LCD_Shield

BIN
Pics/Maker_Pi_Pico_Pinout.png


+ 3 - 0
Pics/README.md

@@ -0,0 +1,3 @@
+# Pictures
+
+Contains pictures, which are used, among other things, for the Task inside the main readme file.

BIN
Pics/Raspberry_Pi_Pico_Pinout.png


BIN
Pics/Raspberry_Pi_Pico_W_Pinout.png


+ 17 - 0
boot.py

@@ -0,0 +1,17 @@
+"""
+Author:     Tobias Müller
+Date:       30.06.2023
+Version:    1.0
+
+The "boot.py" will be started before "main.py" and is used to setup the Pico.
+"""
+
+##############################                 Modules               ##############################
+
+from machine import freq
+from sys import path
+
+##############################                 Code                   ##############################
+
+freq(250000000)         # overclock CPU from 133 MHz to 250 MHz
+path.append("/Libs")    # add path for libraries

+ 52 - 0
main.py

@@ -0,0 +1,52 @@
+"""
+Author:     Tobias Müller
+Date:       30.06.2023
+Version:    1.0
+
+Main File to run on the pico.
+"""
+
+##############################                 Modules                ##############################
+
+from Libs.LCD_Shield import LCD
+
+##############################            Global Variables            ##############################
+
+
+##############################                 Main                   ##############################
+
+def main():
+    """
+    Main Program
+    """
+
+    ##########################           Local Variables            ############################
+    
+    
+    ##########################                Code                  ############################
+    pin = Pin(2,Pin.OUT)
+    pin.on()
+    foo()
+    d = dht.DHT11(Pin(3))
+    d.measure()
+    print(d.temperature())
+    print(d.humidity())
+    pin.off()
+
+    pwm = PWM(Pin(18))
+    pwm.freq(1000)
+    pwm.duty_u16(2000)
+    pwm.deinit()
+
+##############################               Functions                ##############################
+
+def bar():
+    """
+    Example function.
+    """
+    print("bar")
+
+##############################                  Run                   ##############################
+
+if __name__ == "__main__":
+    main()