kashimastro / ofxgpio Goto Github PK
View Code? Open in Web Editor NEWLibrary C++ for raspberrypi and orangepi, GPIO interfaces compatible with openframeworks.
License: MIT License
Library C++ for raspberrypi and orangepi, GPIO interfaces compatible with openframeworks.
License: MIT License
The example compiles, and when it runs a terminal message indicates the SPI setup was successful. This happens whether the example is run with sudo or without. The example lights up the leds with Jessie and the same hardware.
When I run the example-simple-led program I get the following
OPERATION FAILED: Unable to set direction of GPIO2
OPERATION FAILED: Unable to set value of GPIO2
im a bit confused about how to use ofxGPIO with the other examples that come with ofx. i've got the example-simple-led working and flashing. i've got the colorExample (inside graphicss examples) working on the screen. how do I combine the two?
perhaps you could show me some files which have all the ofapp.cpp, ofapp.h and main.cpp?
any help would be great. cheers =)
Running the example-simple-led produces no change in voltage on GPIO 17. When I change this pin in the code, there is still no voltage output (it stays at Ground).
However, reading the state of a digital pin does work, using example-simple-button.
I'm using a Raspberry Pi Zero with Rasbian Jessie Lite.
hello, i am trying to read from a MCP3008 on the spi1
port of a raspberry pi3. (spi1 has been enabled in the config.txt)
in openframeworks if i setup my a2d like this:
a2d.setup("/dev/spidev0.0", SPI_MODE_O, 1000000, 8)
then it works perfectly for the pin-setup :
MISO -> BCM 9
MOSI -> BCM 10
CLK -> BCM 11
CS -> BCM 8
however i already have a screen attached to the spi0
pins, which is interfaced with python.
what i had hoped is that if i setup my a2d with spi1 like this :
a2d.setup("/dev/spidev1.0", SPI_MODE_O, 1000000, 8)
then i could wire my a2d like this:
MISO -> BCM 19
MOSI -> BCM 20
CLK -> BCM 21
CS -> BCM 18
however this does not work. in fact it still correctly reads from spi0
if as wired before (and messes with my screen on spi0
when that is wired in)
is it currently possible to switch this in ofxGPIO ? i can correctly set my display to use spi1
with a code change but have already ordered pcbs with it this way round.
thanks !
Hello,
I am trying to use the SPI with MCP23S08 (IO Expander).
I tried with Arduino before to make sure my code works and I read/write the correct registers but I cannot make it work with the RPI.
I connected the chip as follow:
I also power the chip with +3.3V (pin 1)
Here is my code, can you spot something I am doing wrong?
SPI2 _spi;
//--------------------------------------------------------------
void ofApp::setup(){
// Setup our chip on SPI 0
_spi.setup("/dev/spidev0.0", 0, 1000000);
// Configure chip: set all GPIO as input
char data[3];
data[0] = 0x40; // Opcode
data[1] = 0x00; // IODIR - I/O Direction register
data[2] = 0xff; // all GPIO pins are inputs
// Write the 3 data bits on channel 0
_spi.readWrite(0, (unsigned char *)data, 3);
}
//--------------------------------------------------------------
void ofApp::update(){
// Read all 8 IO expander inputs
char data[3];
data[0] = 0x41; // Opcode
data[1] = 0x09; // GPIO - I/O port register address
data[2] = 0x00; // Dummy to read the value
// Write the 3 data bits on channel 0
val = _spi.readWrite(0, (unsigned char *)data, 3);
ofLogVerbose() << "Val = " << val;
}
Hi tested the spi example with the connection to the adc3008 shown in the readme but i always get the error "Problem transmitting spi data..ioctl". I tried the button example and this is working fine.
Thanks in advance.
can you plan to do same for Asus TB ?
thnx.
hi!
i have this problem when try to compiling with of OF 0.9.3 on raspberry pi 1 b+
i try to fix this with add memset(&spi,0,sizeof spi); after struct spi_ioc_transfer spi[length] defined
and and/or add memset(&spi[i], 0, sizeof (spi[i])); inside the for loop. but this not work.
any idea?
https://bugs.launchpad.net/raspbian/+bug/1419113
http://www.raspberry-projects.com/pi/programming-in-c/spi/using-the-spi-interface
sorry for my inglish.
thanks for share!
I have a strange issue, I am running my app with elevated (Sudo) permissions. I don't get any response from a simple push button until I run node red to test the setup. Then my OF app will run perfectly until a reboot.
The only obvious difference I see is node red has a checkbox for setting pull up and pull down states for input pins. Is this function available in ofxgpio or is there something deeper at play.
I am using the latest OF and stretch install.
i have this error when i compile simple button example with windows
obj/linuxarmv6l/Release/src/ofApp.o:(.data+0x0): multiple definition of `OLEDFont'
obj/linuxarmv6l/Release/src/main.o:(.data+0x0): first defined here
collect2: error: ld returned 1 exit status
Great stuff!
You should add #pragma once to .h files as in this fork https://github.com/produceconsumerobot/ofxGPIO
Cheers,
Sean
would your addon work on the PI2 with OF 0.9.0 ?
thanks.
I can't find out how to set the pull up resistors in ofxGPIO? or is this feature not supported.
Hello,
I've tried some of the examples of the ofxgpio and I have some issues with the simple ones.
I'm using a raspberry 3 B+ with of 0.9.3.
It compiles very well.
The simple button example runs perfectly.
But None of the simple led or the relay example.
When I check the tension between the gpio pin and the ground it stays at 0V.
Actually I managed to blink a led with command line I found at
http://www.blaess.fr/christophe/2012/11/26/les-gpio-du-raspberry-pi/
Here is the result in the terminal
I'm a beginner, but it seems to be the same code as in the addon.
Did I miss something ?
I'm currently developing an application using this addon and it an the RPI it works fine. But as soon, as I add the addon, I can't compile my app on my notebook (Arch) anymore, which makes sense, as it has no GPIO pins..
I didn't dig to deep into your code yet, but would it make sense to simulate the pins, if not available?
I was thinking similar to this solution for the python implementation.
Not sure, if it really makes sense, just throwing the idea out there.
Dear KashimAstro,
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:28:20: error: no match for ‘operator<’ (operand types are ‘std::ofstream {aka std::basic_ofstream}’ and ‘int’)
if (exportgpio < 0){
~~~~~~~~~~~^~~
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:28:20: note: candidate: operator<(int, int)
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:28:20: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘int’
In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_pair.h:441:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:441:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:28:22: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::pair<_T1, _T2>’
if (exportgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:298:5: note: candidate: template bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator<(const reverse_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:298:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:28:22: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (exportgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:355:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator<(const reverse_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:355:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:28:22: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (exportgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:1137:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
operator<(const move_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:1137:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:28:22: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::move_iterator<_IteratorL>’
if (exportgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:1143:5: note: candidate: template bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
operator<(const move_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:1143:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:28:22: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::move_iterator<_IteratorL>’
if (exportgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5150:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5150:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:28:22: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
if (exportgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5163:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5163:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:28:22: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
if (exportgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5175:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const _CharT* __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5175:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:28:22: note: mismatched types ‘const _CharT*’ and ‘std::basic_ofstream’
if (exportgpio < 0){
^
In file included from /usr/include/c++/6/bits/ios_base.h:46:0,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/system_error:200:3: note: candidate: bool std::operator<(const std::error_code&, const std::error_code&)
operator<(const error_code& __lhs, const error_code& __rhs) noexcept
^~~~~~~~
/usr/include/c++/6/system_error:200:3: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘const std::error_code&’
/usr/include/c++/6/system_error:274:3: note: candidate: bool std::operator<(const std::error_condition&, const std::error_condition&)
operator<(const error_condition& __lhs,
^~~~~~~~
/usr/include/c++/6/system_error:274:3: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘const std::error_condition&’
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp: In member function ‘int GPIO::unexport_gpio()’:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:42:22: error: no match for ‘operator<’ (operand types are ‘std::ofstream {aka std::basic_ofstream}’ and ‘int’)
if (unexportgpio < 0){
~~~~~~~~~~~~~^~~
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:42:22: note: candidate: operator<(int, int)
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:42:22: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘int’
In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_pair.h:441:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:441:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:42:24: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::pair<_T1, _T2>’
if (unexportgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:298:5: note: candidate: template bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator<(const reverse_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:298:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:42:24: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (unexportgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:355:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator<(const reverse_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:355:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:42:24: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (unexportgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:1137:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
operator<(const move_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:1137:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:42:24: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::move_iterator<_IteratorL>’
if (unexportgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:1143:5: note: candidate: template bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
operator<(const move_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:1143:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:42:24: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::move_iterator<_IteratorL>’
if (unexportgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5150:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5150:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:42:24: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
if (unexportgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5163:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5163:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:42:24: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
if (unexportgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5175:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const _CharT* __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5175:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:42:24: note: mismatched types ‘const _CharT*’ and ‘std::basic_ofstream’
if (unexportgpio < 0){
^
In file included from /usr/include/c++/6/bits/ios_base.h:46:0,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/system_error:200:3: note: candidate: bool std::operator<(const std::error_code&, const std::error_code&)
operator<(const error_code& __lhs, const error_code& __rhs) noexcept
^~~~~~~~
/usr/include/c++/6/system_error:200:3: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘const std::error_code&’
/usr/include/c++/6/system_error:274:3: note: candidate: bool std::operator<(const std::error_condition&, const std::error_condition&)
operator<(const error_condition& __lhs,
^~~~~~~~
/usr/include/c++/6/system_error:274:3: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘const std::error_condition&’
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp: In member function ‘int GPIO::setdir_gpio(std::__cxx11::string)’:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:57:24: error: no match for ‘operator<’ (operand types are ‘std::ofstream {aka std::basic_ofstream}’ and ‘int’)
if (setdirgpio < 0){
~~~~~~~~~~~^~~
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:57:24: note: candidate: operator<(int, int)
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:57:24: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘int’
In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_pair.h:441:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:441:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:57:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::pair<_T1, _T2>’
if (setdirgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:298:5: note: candidate: template bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator<(const reverse_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:298:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:57:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (setdirgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:355:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator<(const reverse_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:355:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:57:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (setdirgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:1137:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
operator<(const move_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:1137:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:57:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::move_iterator<_IteratorL>’
if (setdirgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:1143:5: note: candidate: template bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
operator<(const move_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:1143:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:57:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::move_iterator<_IteratorL>’
if (setdirgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5150:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5150:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:57:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
if (setdirgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5163:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5163:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:57:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
if (setdirgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5175:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const _CharT* __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5175:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:57:26: note: mismatched types ‘const _CharT*’ and ‘std::basic_ofstream’
if (setdirgpio < 0){
^
In file included from /usr/include/c++/6/bits/ios_base.h:46:0,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/system_error:200:3: note: candidate: bool std::operator<(const std::error_code&, const std::error_code&)
operator<(const error_code& __lhs, const error_code& __rhs) noexcept
^~~~~~~~
/usr/include/c++/6/system_error:200:3: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘const std::error_code&’
/usr/include/c++/6/system_error:274:3: note: candidate: bool std::operator<(const std::error_condition&, const std::error_condition&)
operator<(const error_condition& __lhs,
^~~~~~~~
/usr/include/c++/6/system_error:274:3: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘const std::error_condition&’
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp: In member function ‘int GPIO::setval_gpio(std::__cxx11::string)’:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:72:24: error: no match for ‘operator<’ (operand types are ‘std::ofstream {aka std::basic_ofstream}’ and ‘int’)
if (setvalgpio < 0){
~~~~~~~~~~~^~~
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:72:24: note: candidate: operator<(int, int)
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:72:24: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘int’
In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_pair.h:441:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:441:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:72:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::pair<_T1, _T2>’
if (setvalgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:298:5: note: candidate: template bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator<(const reverse_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:298:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:72:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (setvalgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:355:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator<(const reverse_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:355:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:72:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (setvalgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:1137:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
operator<(const move_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:1137:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:72:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::move_iterator<_IteratorL>’
if (setvalgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:1143:5: note: candidate: template bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
operator<(const move_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:1143:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:72:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::move_iterator<_IteratorL>’
if (setvalgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5150:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5150:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:72:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
if (setvalgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5163:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5163:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:72:26: note: ‘std::ofstream {aka std::basic_ofstream}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
if (setvalgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5175:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const _CharT* __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5175:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:72:26: note: mismatched types ‘const _CharT*’ and ‘std::basic_ofstream’
if (setvalgpio < 0){
^
In file included from /usr/include/c++/6/bits/ios_base.h:46:0,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/system_error:200:3: note: candidate: bool std::operator<(const std::error_code&, const std::error_code&)
operator<(const error_code& __lhs, const error_code& __rhs) noexcept
^~~~~~~~
/usr/include/c++/6/system_error:200:3: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘const std::error_code&’
/usr/include/c++/6/system_error:274:3: note: candidate: bool std::operator<(const std::error_condition&, const std::error_condition&)
operator<(const error_condition& __lhs,
^~~~~~~~
/usr/include/c++/6/system_error:274:3: note: no known conversion for argument 1 from ‘std::ofstream {aka std::basic_ofstream}’ to ‘const std::error_condition&’
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp: In member function ‘int GPIO::getval_gpio(std::__cxx11::string&)’:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:86:20: error: no match for ‘operator<’ (operand types are ‘std::ifstream {aka std::basic_ifstream}’ and ‘int’)
if (getvalgpio < 0){
~~~~~~~~~~~^~~
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:86:20: note: candidate: operator<(int, int)
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:86:20: note: no known conversion for argument 1 from ‘std::ifstream {aka std::basic_ifstream}’ to ‘int’
In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_pair.h:441:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^~~~~~~~
/usr/include/c++/6/bits/stl_pair.h:441:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:86:22: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘const std::pair<_T1, _T2>’
if (getvalgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:298:5: note: candidate: template bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator<(const reverse_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:298:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:86:22: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (getvalgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:355:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator<(const reverse_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:355:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:86:22: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if (getvalgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:1137:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
operator<(const move_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:1137:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:86:22: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘const std::move_iterator<_IteratorL>’
if (getvalgpio < 0){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/stl_iterator.h:1143:5: note: candidate: template bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
operator<(const move_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/6/bits/stl_iterator.h:1143:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:86:22: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘const std::move_iterator<_IteratorL>’
if (getvalgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5150:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5150:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:86:22: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
if (getvalgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5163:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5163:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:86:22: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
if (getvalgpio < 0){
^
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5175:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const _CharT* __lhs,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5175:5: note: template argument deduction/substitution failed:
/home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:86:22: note: mismatched types ‘const _CharT*’ and ‘std::basic_ifstream’
if (getvalgpio < 0){
^
In file included from /usr/include/c++/6/bits/ios_base.h:46:0,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from /home/pi/openframeworks/addons/ofxGPIO/src/gpio.cpp:1:
/usr/include/c++/6/system_error:200:3: note: candidate: bool std::operator<(const std::error_code&, const std::error_code&)
operator<(const error_code& __lhs, const error_code& __rhs) noexcept
^~~~~~~~
/usr/include/c++/6/system_error:200:3: note: no known conversion for argument 1 from ‘std::ifstream {aka std::basic_ifstream}’ to ‘const std::error_code&’
/usr/include/c++/6/system_error:274:3: note: candidate: bool std::operator<(const std::error_condition&, const std::error_condition&)
operator<(const error_condition& __lhs,
^~~~~~~~
/usr/include/c++/6/system_error:274:3: note: no known conversion for argument 1 from ‘std::ifstream {aka std::basic_ifstream}’ to ‘const std::error_condition&’
Does it support orange pi 4g-iot ?
hi,
first of all thank you for you extraordinary work!
can you give me some hint why my servo isn't moving. your example code compiles without errors, runs without errors. but servo stands still. when i try to move the servo with python code it works fine, so its no power or current issue or general I/O issue. it's a small sg90 servo. Do you have an idea where i can start to investigate?
Greetings
You have examples using I2C y SPI, but I can use one of this using the ADS1015 12-Bit ADC - 4 Channel with Programmable Gain Amplifier.
I am having some strange issues, I need to autostart my app, I am using ofxGPIO for input, output, SPI and i2c on a raspberry pi 2b+ with bullseye.
Most of the time the code runs well, at first with a fresh install I could net get GPIO access but after running the user permission changes in this post https://forum.openframeworks.cc/t/ofxgpio-update-debian-stretch/28430/4?u=kashim
I can get input and output - most of the time.
Now I have a strange issue where sometimes on boot the return from my input (just a simple button) is 1, whereas usually it is 0 - I have a state machine to allow for different commands: double presses, triple presses and long presses. When the app starts up with the output inverted my long presses are triggered automatically. Obviously this is not desirable.
Is there a change for the permsision setup for bulleye? Is there an order i need to initialise my pins?
I try to compile "example-i2c-scanner"
In file included from ../src/ofxGPIO.h:44:0,
from src/main.cpp:2:
../src/readata.h: In member function ‘void ReadRawData::update()’:
../src/readata.h:353:23: warning: unused variable ‘ok’ [-Wunused-variable]
char ok= -1;
OF 0.10.1, RPI 3, Raspbian Stretch.
Non-gui examples button and relay seem ok. When you try to use any GPIO code
with an OF windowed application., you get the above error.
Rebooting doesn't fix it, so cannot use this addon.
Need a fix!!
Hi, there are some errors in the 12C examples, for the I2C scanner the OF version is actually without OF and throws, no rule to make target run
The straight 12c examples bails on the make.
I am trying to use an LIS3DH adafruit accelerometer, but I want to check the connection first...
while trying to get the simple led example to work on rpi3 i found i need to add a ofSleepMillis(100);
after gpio17.export_gpio();
.
otherwise the pin does not react.
As for now I just try to make the simple button it compile well but the app doesn't return any result on GPIO17
I need to investigate more.
Hello,
Can I use SPI1 and pins 20,21 for driving APA102?
I tried to change the port on setupAPA102 but didn't worked because there is a bug in the led.h at the setAPA102 (spi.readWrite selects always 0)
spi.readWrite(0, (unsigned char*)buffer0, 1)
But even after change this to 1, still cannot use pin 20 and 21.
Do you have any recommendation?
thank you
I'm trying to adapt the read-write example to a distance sensor (HC-SR04), sending a Trigger and getting the Echo result. I'd be glad if I get help with this not working code :
#include "ofMain.h"
#include "ofAppNoWindow.h"
#include "ofxGPIO.h"
class noWin : public ofBaseApp{
public:
GPIO* gpio17;
GPIO* gpio39;
GPIO* gpio40;
string state_button, echo;
void setup(){
gpio17 = new GPIO("17");
gpio39 = new GPIO("39"); // Trigger (out)
gpio40 = new GPIO("40"); // Echo (in)
gpio17->export_gpio();
gpio39->export_gpio();
gpio40->export_gpio();
gpio17->setdir_gpio("in"); // State
gpio39->setdir_gpio("out"); // Trigger
gpio40->setdir_gpio("in"); // Echo
}
void update(){
if(state_button == "1"){
gpio39->setval_gpio("1");
usleep(10);
gpio40->getval_gpio(echo);
ofLog()<< echo;
}
if(state_button == "0"){
gpio39->setval_gpio("0");
usleep(5000);
}
}
void exit(){
gpio17->unexport_gpio();
gpio39->unexport_gpio();
gpio40->unexport_gpio();
}
};
int main( ){
ofAppNoWindow window;
ofSetupOpenGL(&window, 0,0, OF_WINDOW);
ofRunApp( new noWin() );
}
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.