Go to advanced search

by steven1977
Sun Nov 12, 2017 5:19 pm
Forum: Beginners
Topic: installing sqlite3 for node red
Replies: 2
Views: 2182

Re: installing sqlite3 for node red

thx for the tip, but I also found that page.

There seem to be a lot of people struggling with the same problem as I'm having.
I already tried a lot of "solutions" found with google, but still not working :(
by steven1977
Sun Nov 12, 2017 4:44 pm
Forum: Beginners
Topic: installing sqlite3 for node red
Replies: 2
Views: 2182

installing sqlite3 for node red

Hello, I'm trying to set up a SQLite database on my raspberry in which I want to log data from DHT22 sensors (temperature and humidity) Until now I could install SQLite3 on my RPi and create a new table. Now I'm trying to install SQLite3 for node red but getting errors : command : sudo npm install s...
by steven1977
Sat Nov 04, 2017 3:49 pm
Forum: Beginners
Topic: connecting my RPi to an access point
Replies: 4
Views: 454

Re: connecting my RPi to an access point

I changed the cable to another port on the access point and it works on that port. So I have one faulty port on my access point?
by steven1977
Sat Nov 04, 2017 2:42 pm
Forum: Beginners
Topic: connecting my RPi to an access point
Replies: 4
Views: 454

connecting my RPi to an access point

Hello, I'm trying to establish a SSH connection from my laptop to my RPi. When I connect my RPi to my access point through Wifi it works fine : My RPi gets an IP address in the range of 192.168.0 and I can open a SSH connection on my laptop (which is also connected through wifi with the same access ...
by steven1977
Sun May 28, 2017 8:23 am
Forum: Automation, sensing and robotics
Topic: Connect multiple Arduino's to a Raspberry
Replies: 1
Views: 642

Connect multiple Arduino's to a Raspberry

I'm thinking of creating a robot with a Raspberry. This Raspberry should then communicate with different Arduino's. One arduino fro driving the motors. Another arduino on which I connect the sensors. ... I'm also thinking of using 2 OLEDs through SPI. (probably also via an Arduino). What would be th...
by steven1977
Sun May 14, 2017 9:09 am
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

Just a quick update :

I finally got it working.

The whole library can now be found here :

https://github.com/stevennoppe/micro-OL ... -Raspberry

I can now use this oled with SPI and I2C on a Raspberry...

any suggestions/comments are always welcome :D
by steven1977
Sun May 07, 2017 4:27 pm
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

That is python code? :(
by steven1977
Sun May 07, 2017 11:39 am
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

an update I'm glad to say that i got it to work with Gordons SPI library! now I want to try it without his library, but I get a "message too long" error : setting up SPI : if ((spi_fd = open("/dev/spidev0.0", O_RDWR)) < 0) { // Failed! printf("Failed to initialize SPI!\n") ; } unsigned int speed = 1...
by steven1977
Sat May 06, 2017 6:45 pm
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

Thanks for all the help, I finally figured out my mistake! :( On the OLED board the D/C jumper was set to "0" and should've been set fully open. I misinterpreted it on the website. Only after my second OLED arrived (standard in SPI mode) I saw my mistake. I haven't tried it yet on my Raspberry, but ...
by steven1977
Thu May 04, 2017 1:19 pm
Forum: Beginners
Topic: bleutooth connexion
Replies: 1
Views: 244

Re: bleutooth connexion

Check my blog in my signature, maybe it could be of any help...
by steven1977
Thu Apr 20, 2017 7:40 pm
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

To give you guys an update : I connected this OLED to an Arduino on SPI and got the same results :( So either the OLED is faulty or I did something wrong with the connections. I already ordered a new OLED and when it arrives I will check again with the new one... Unless someone else can think of wha...
by steven1977
Sun Apr 16, 2017 7:12 am
Forum: C/C++
Topic: C/C++ GPIO usage
Replies: 15
Views: 4444

Re: C/C++ GPIO usage

and how do you check the gpio now in C without a library like wiringPi?
by steven1977
Sun Apr 16, 2017 7:08 am
Forum: C/C++
Topic: Hardware interrupts using C
Replies: 26
Views: 14468

Re: Hardware interrupts using C

i've heard that sometimes the raspberry doesn't react that fast on interrupts and that it lags in some cases up to 500ms.
Anyone else heard this problem?
by steven1977
Fri Apr 14, 2017 6:13 pm
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

let's start from scratch : connections : OLED----------------------RPI --------------------------------------- GND-----------------------GND 3V3-------------------------3V3 MOSI-----------------------GPIO10 (SPI0_MOSI) SCLK-----------------------GPIO11 (SPI0_SCLK) D/C--------------------------GPIO18...
by steven1977
Fri Apr 14, 2017 5:30 pm
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

One thing I noticed :

In SPI I have to connect the SPI0_CE0_N or SPI0_CE1_N? Is this right? Or not always?

I haven't connected this pin on my raspberry?!?
by steven1977
Fri Apr 14, 2017 5:01 pm
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

Still having problems :( I now have : void microOLED::command(uint8_t c) { if (interface == MODE_SPI) { struct spi_ioc_transfer spi; memset (&spi, 0, sizeof (spi)) ; unsigned char txDat = c; unsigned char rxDat = 0 ; spi.tx_buf = (unsigned) txDat ; spi.rx_buf = (unsigned) NULL ; spi.len = 1 ; spi.sp...
by steven1977
Thu Apr 13, 2017 6:00 am
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

yeah, I know that I'm making it more complicated then it is, but that because I'm getting desperate :D

Time to clear my head and retry within a couple of days...
by steven1977
Wed Apr 12, 2017 8:19 pm
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

It seemed that the ioctl(spi_fd, SPI_IOC_MESSAGE(1), &buf) failed. after doing more searching on the internet I found out that there is a struct that you can use so I changed my code to this : void microOLED::command(uint8_t c) { if (interface == MODE_SPI) { struct spi_ioc_transfer spi; memset (&spi...
by steven1977
Wed Apr 12, 2017 4:29 pm
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

no photo, but I connected the Oled with my RPI like this : OLED-----------------------------------------RPI 3 ------------------------------------------------------------- GND-----------------------------------------25 (gnd) 3V3------------------------------------------1 (3V3) MOSI------------------...
by steven1977
Wed Apr 12, 2017 3:47 pm
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

I'm trying to do it without wiringPi now, but also with no luck, I do not even get a scrambled display anymore... first setup SPI void microOLED::spiSetup() { if ((spi_fd = open("/dev/spidev0.0", O_RDWR)) < 0) { // Failed! } unsigned int speed = 1000000; if (ioctl(spi_fd, SPI_IOC_WR_MAX_SPEED_HZ, &s...
by steven1977
Wed Apr 12, 2017 9:33 am
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

If it helps, this is the OLED I'm experimenting with :

https://www.sparkfun.com/products/13003
by steven1977
Wed Apr 12, 2017 7:28 am
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

Re: SPI communication with an OLED

What I saw yesterday is that if I didn't wiggle the CS line nothing happened.

wiringPiSPISetup() was used somewhere else in that class.

I have to check which SPI lines I set with a pinMode.

more later this evening...
by steven1977
Tue Apr 11, 2017 7:42 pm
Forum: C/C++
Topic: SPI communication with an OLED
Replies: 25
Views: 3875

SPI communication with an OLED

I'm trying to convert some code from an arduino library that communicates with an OLED from sparkfun through SPI. I already got the library to work with i2c but I'm having trouble with the SPI code. Because the library works with I2C I know that the only problem (I think) is how I send the byte thro...
by steven1977
Tue Apr 04, 2017 3:51 pm
Forum: C/C++
Topic: create a function that accepts unknown number of arguments
Replies: 3
Views: 469

Re: create a function that accepts unknown number of argumen

indeed vsprintf() was what I needed

my code :

Code: Select all

size_t microOLED::print2OLED(char *fmt, ...)
{
	char printBuf[1024] = "";
	va_list args ;
	size_t returnValue = 0 ;
	
	va_start(args, fmt) ;
	
	vsprintf(printBuf, fmt, args) ;
      
        rest of my code .....
}
by steven1977
Tue Apr 04, 2017 3:14 pm
Forum: C/C++
Topic: create a function that accepts unknown number of arguments
Replies: 3
Views: 469

create a function that accepts unknown number of arguments

I need a little bit of help I'm experimenting with code to drive a OLED and I want to create a function like printf() pseudo code : int decimalnumber = 100 ; char character = 'c' ; print2OLED("Decimal : %d, Char : %c, ...", decimalnumber, character) ; and in the function I would like to create a new...

Go to advanced search