barulicm / pipca9685 Goto Github PK
View Code? Open in Web Editor NEWC++ and Python Library for PCA9685 chips and the Raspberry Pi
License: MIT License
C++ and Python Library for PCA9685 chips and the Raspberry Pi
License: MIT License
HI barulicm, thanks for sharing your code!
I want to know what operation system is this project for? Is this for Raspbian?
I installed Ubuntu-mate on raspberry pi due and encountered some problem when I tried to execute the object file(It can be made successfully)
Could you please view
https://stackoverflow.com/questions/56619052/how-to-fix-open-no-such-file-or-directory-errorthe-file-actually-exists-aft?noredirect=1#comment99812600_56619052
if you have time?
Thank you!
root@raspberrypi:/var/www/html/servos/voprosServlib/examples/cpp# gcc main.cpp
/usr/bin/ld: /tmp/cczyiq5T.o: in function main': main.cpp:(.text+0x14): undefined reference to
std::allocator::allocator()'
/usr/bin/ld: main.cpp:(.text+0x28): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)' /usr/bin/ld: main.cpp:(.text+0x3c): undefined reference to
PCA9685::PCA9685(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)'
/usr/bin/ld: main.cpp:(.text+0x48): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' /usr/bin/ld: main.cpp:(.text+0x54): undefined reference to
std::allocator::~allocator()'
/usr/bin/ld: main.cpp:(.text+0x64): undefined reference to PCA9685::set_pwm_freq(double)' /usr/bin/ld: main.cpp:(.text+0x78): undefined reference to
PCA9685::set_pwm(int, unsigned short, unsigned short)'
/usr/bin/ld: main.cpp:(.text+0x94): undefined reference to PCA9685::set_pwm(int, unsigned short, unsigned short)' /usr/bin/ld: main.cpp:(.text+0xb0): undefined reference to
PCA9685::set_pwm(int, unsigned short, unsigned short)'
/usr/bin/ld: main.cpp:(.text+0xcc): undefined reference to PCA9685::set_pwm(int, unsigned short, unsigned short)' /usr/bin/ld: main.cpp:(.text+0xe4): undefined reference to
std::__cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()'
/usr/bin/ld: main.cpp:(.text+0xf4): undefined reference to std::allocator<char>::~allocator()' /usr/bin/ld: main.cpp:(.text+0xf8): undefined reference to
__cxa_end_cleanup'
/usr/bin/ld: /tmp/cczyiq5T.o:(.ARM.extab+0x0): undefined reference to `__gxx_personality_v0'
collect2: error: ld returned 1 exit status
root@raspberrypi:/var/www/html/servos/voprosServlib/examples/cpp#
Issue #1 highlights the need for more informative and/or helpful error messages in certain parts of the library.
For example, "open: no such file or directory" has a few issues
Hi,
after executing ./build/example-cpp i get an error:
terminate called after throwing an instance of 'std::system_error'
what(): Could not write value (0) to register 250: Remote I/O error
WiringPi is no longer a dependable project. I'll need to remove it as a dependency.
Perhaps just switch to using the Linux I2C API directly.
Hi, I followed the installation instructions and installed the library. But I can't run any of the examples.
When I try to run examples.py, I get the following error.
File "example.py", line 1, in
from PiPCA9685.PiPCA9685 import PCA9685
ImportError: No module named PiPCA9685
Then when I try to compile the cpp code, I get the following error after running cmake ..
CMake Error at CMakeLists.txt:6 (find_package):
By not providing "FindPiPCA9685.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"PiPCA9685", but CMake did not find one.
Could not find a package configuration file provided by "PiPCA9685" with
any of the following names:
PiPCA9685Config.cmake
pipca9685-config.cmake
Add the installation prefix of "PiPCA9685" to CMAKE_PREFIX_PATH or set
"PiPCA9685_DIR" to a directory containing one of the above files. If
"PiPCA9685" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
See also "/home/bdog/PiPCA9685/examples/cpp/build/CMakeFiles/CMakeOutput.log".
The raspberry pi I'm using runs Ubuntu Mate 18.04 beta 1 with python2.7.
I'm not quite sure what I'm doing wrong during the installation process, any help would be greatly appreciated.
Thanks!
When I try to remote compile your c++ example code in a new raspberryPi project in vs 2019 i get the following errors:
Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand
Fehler undefined reference to PCA9685::PCA9685(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' RaspberryPi C:\Users\Kai\source\repos\RaspberryPi\RaspberryPi\main.cpp 6 Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand Fehler ld returned 1 exit status RaspberryPi C:\Users\Kai\source\repos\RaspberryPi\RaspberryPi\collect2 1 Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand Fehler /home/pi/projects/RaspberryPi/obj/ARM/Debug/main.o: in function
main': RaspberryPi C:\usr\bin\ld 1
...
I have already tryed to add your libPiPCA0685.a into the AdditionalDependencies, but it just says:
Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand
Fehler libPiPCA9685.a: No such file or directory RaspberryPi C:\Users\Kai\source\repos\RaspberryPi\RaspberryPi\g++ 1
And if i place it in Bibliotheksabhängigkeiten, it says:
Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand
Fehler ld returned 1 exit status RaspberryPi C:\Users\Kai\source\repos\RaspberryPi\RaspberryPi\collect2 1
Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand
Fehler cannot find -llibPiPCA9685 RaspberryPi C:\usr\bin\ld 1
I linked the projekt here:
RaspberryPi.zip
Looks like Makefile generates with install_python
, not python_install
...
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.