Skip to content

iiot2k/pico-lib2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lib2 - C/C++ Library for Raspberry Pi Pico

platform Donate

Description:

Lib2 library implements wrapper functions and device driver for Raspberry Pi Pico.
With lib2 it is more easy to write C/C++applications for Pico.

See Getting Started with the Raspberry Pi Pico for information on getting up and running.

Using:

⚠️Set environment variables PICO_SDK_PATH and PICO_LIB2_PATH.
Add the file pico_lib2_import.cmake in folder external
to your application CMakeLists.txt.

Example CMakeLists.txt file entry:

cmake_minimum_required(VERSION 3.12)

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

# We also need LIB2
include(pico_lib2_import.cmake)

# Your project
project(myproj C CXX)

# Used compiler 
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)

#Your sourfiles
add_executable(myproj main.c)

# Add used libraries
target_link_libraries(myproj
    lib2_sys
    dev_ads1x15
)

# Setup stdio 
pico_enable_stdio_usb(myproj 0)
pico_enable_stdio_uart(myproj 1)

# Create map/bin/hex file etc.
pico_add_extra_outputs(myproj)

Examples:

https://github.com/iiot2k/pico-lib2-examples are examples for using Lib2.

CHANGELOG

Functions and Device Driver:

System:

GPIO Functions
I2C Functions
SPI Functions
ADC Functions
Time Functions
System Functions
Utility Functions

Device Driver:

HD44780 LCD Driver with PCF8574
ADS1115 Four Channel 16-bit ADC
ADS1015 Four Channel 12-bit ADC
MCP4728 Four Channel 12-bit DAC
MCP4725 One Channel 12-bit DAC
DS3231 Accurate Real-Time-Clock

About

Lib2 - C/C++ Library for Raspberry Pi Pico

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published