GithubHelp home page GithubHelp logo

pipca9685's People

Contributors

barulicm avatar

Stargazers

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

Watchers

 avatar  avatar

pipca9685's Issues

Operation System Question

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!

cant compile example cpp code

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#

Improve Error Messages

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

  1. Doesn't even say it's an error, so it's not clear a problem has actually occurred besides the program crashing.
  2. Doesn't explain that the error is originating from this library, making tracking it down more difficult.
  3. Doesn't provide any help with what to do / check next. This could, for example, ask the user if they're sure they've enabled the I2C kernel module (the most likely cause of hitting this message in the wild).

Remove WiringPi dependency

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.

Neither CPP nor Python works

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!

Cant remote compile example-code over ssh with VS 2019

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

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.