yigityuce / blacklib Goto Github PK
View Code? Open in Web Editor NEWBeaglebone Black C++ Library
Home Page: http://blacklib.yigityuce.com/
Beaglebone Black C++ Library
Home Page: http://blacklib.yigityuce.com/
In BlackPWM/BlackPWM.cpp line 382, dutyFile << static_cast<int64_t>(std::round((this->getNumericPeriodValue()) * (1.0 - (percantage/100))));
, round should not be in the std namespace, as it is a part of cmath I believe.
Suggested fix: dutyFile << static_cast<int64_t>(round((this->getNumericPeriodValue()) * (1.0 - (percantage/100))));
../BlackPWM/BlackPWM.cpp:382:46: error: 'round' is not a member of 'std' dutyFile << static_cast<int64_t>(std::round((this->getNumericPeriodValue()) * (1.0 - (percantage/100)))); ^ ../BlackPWM/BlackPWM.cpp:382:46: note: suggested alternative: In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cmath:44:0, from ../BlackPWM/BlackPWM.h:38, from ../BlackPWM/BlackPWM.cpp:32: /usr/include/math.h:282:15: note: 'round' extern double round _PARAMS((double)); ^
Hi,
All that slots PWM rely on is gone. The PWM ends up nowhere.
Hi Yigityuce,
I am using blacklib to build my own robot project. It works well.
But I have a question about the blacklib thread. This is my robot source code.
https://github.com/forwardkth/BBRobot_VisualGDB/blob/master/BBLib_VisualGDB/BlackLib/examples/example_wifirobot.h
In the end of this code, I create TCP receive threads to process the TCP order in the main loop. (There is no loop in TCP receive thread.)
My question is that do I need to mannually delete the threads pointers like "rev" ? And how?
If I do not need to do that, how do you manage this in Blacklib_thread class?
while (1) {
sock = accept(serverSocket,
(struct sockaddr_) &clientAddr,
(socklen_t_)&clientAddrSize);
char order[1];
recv(sock, &order, 1, 0);
if (order[0] != NULL) {
TCP_receiver *rev = new TCP_receiver(sock, order[0],servoXY, servoZ,
laser_status,
servoxy_angle,
servoz_angle,
GPIO1_12,
GPIO1_13,
GPIO1_14,
GPIO1_15,
GPIO1_6);
rev->run();
}
}
Best Regards,
Hi,
Great wrapper for GPIO pin control using sysfs! You've saved me a lot of time coding.
I would like to Inherit from BlackGPIO, unfortunately my compiler won't stand for it.
Hierarchy would like similar to this:
class BlackCore{}
class BlackCoreGPIO : private virtual BlackCore{}
class BlackGPIO : private virtual BlackCoreGPIO{}
class MyGPIO : private BlackGPIO{}
I've intentionally left out the initialization/parameter details of the base classes in the above examples.
Perhaps I am not Inheriting properly. Are you able to subclass BlackGPIO?
I can if I modify:
class BlackGPIO : virtual private BlackCoreGPIO {
to read
class BlackGPIO : private BlackCoreGPIO {
in the V3 library file BlackGPIO.h
Do you have any examples of using blacklib to control a servo? I have been able to get motor control going but I feel like I damaged a servo already and wanted to know if you could assist
Hello Mr. Yiğit Yüce,
Currently, I am doing a project using BeagleBone Black Wireless (BBBW). I manage to find the pinOut Guide for BBBW from the BenglBone.org website.
However, I could not use the BlackLib v3.0 library.
Image of my BBBW.zip
I am not sure whether the BeagleBone Black (BBB) library could run BeagleBone Black Wireless(BBBW).
Other than that, I would like to receive some help about the ultrasonic sensor (HC-SR04) that can output the analog voltage through C++ coding onto the terminal, since I am using Ubuntu platform.
I also did see many youtube on how to configure the root@beaglebone for AIN0 and PWM, I could not get help on the BBBW due to path location not same as BBB. The purpose I do the root is trying to get the in-voltage data from the HC-SR04 sensor but I have failed.
I really really need this help very much and I've been stuck for many weeks.
Thank you.
I had compiled a static library,and GPIO are confirmed available.
But,ADC is not work when I test for ADC. I can get value in
file: /sys/bus/iio/devices/iio:device0/in_voltage0_raw
I get the follwing information when I run the example. I had setup the SPI use setup_from_BBB. BLACKLIB-SPI0-00A0.dtbo and BLACKLIB-SPI1-00A0.dtbo files are ready in /lib/firmware.
Can you help me what can I do next?
Hi, @yigityuce . My team would like to use this repository for avionics software for a NASA competition rocket. You could put on your resume that your C++ library has been used in production avionics code. Would you consider licensing this such that others can use it?
See here for more information on unlicensed code.
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.