Go to advanced search

by halhertani
Mon Aug 04, 2014 4:33 am
Forum: C/C++
Topic: Qt4/C++ Access /dev/mem using tightvnc from Windows 7
Replies: 6
Views: 3512

Re: Qt4/C++ Access /dev/mem using tightvnc from Windows 7

Mad-hatter, There is a bug that causes this error whenever one attempts to run a Qt4 application as root over VNC. I was able to fix it by typing "export QT_X11_NO_MITSHM=1" into the RPi's terminal before starting the Qt4 app (from within the same terminal). Alternatively you can type "export QT_GRA...
by halhertani
Mon Apr 28, 2014 12:38 pm
Forum: Compute Module
Topic: Female Headers for the IO Board
Replies: 46
Views: 12011

Re: Female Headers for the IO Board

ok, the main reason I started this thread was to discuss possible modifications to the IO board. I think we've all pitched in with our opinions and had the discussion in a more or less civilized fashion. This thread was not intended to be a 'let's complain & whine about everything under the sun' thr...
by halhertani
Sun Apr 27, 2014 5:17 pm
Forum: Graphics programming
Topic: cross-compile qt application for rpi
Replies: 2
Views: 8843

Re: cross-compile qt application for rpi

ebito, The trick is to link your QT4 application source (written on the PC) with QT4 libraries (on the RPi) compiled for Raspberry Pi/Raspbian OS. To summarize: Install the RPi's cross compiling toolchain on your PC. Install the QT4 libraries on the Raspberry Pi/Raspbian OS. Mount the RPi's root fil...
by halhertani
Thu Apr 24, 2014 12:24 pm
Forum: Compute Module
Topic: Female Headers for the IO Board
Replies: 46
Views: 12011

Re: Female Headers for the IO Board

Jamesh, I understand that the IO board is just a development platform.....and I'm grateful that the RPi Foundation is making such an IO board available along with the compute module from day one. But I would've liked this board be a bit more hobbyist/maker friendly. I'm sure that other IO boards wil...
by halhertani
Thu Apr 24, 2014 9:55 am
Forum: Compute Module
Topic: Female Headers for the IO Board
Replies: 46
Views: 12011

Re: Female Headers for the IO Board

arm2, That maybe the case, but the IO Board would need 2*30 IDC header/cables..... two of them to access all the I/O. Attaching IDC connectors (and quite possibly 2 of them) that large to a breadboard / custom PCB would take up a heck of a lot of space/board real-estate. Perhaps using IDC cables to ...
by halhertani
Wed Apr 23, 2014 10:24 am
Forum: Compute Module
Topic: Female Headers for the IO Board
Replies: 46
Views: 12011

Female Headers for the IO Board

I have one issue with the Compute module's IO board. I'm not a big fan of the 0.1" male headers. I'd rather see 0.1″ female headers in their stead. This will make the IO board easier to use in hardware interfacing projects. The original RPi board had 0.1″ male connectors but could easily be interfac...
by halhertani
Mon Apr 21, 2014 8:10 pm
Forum: HATs and other add-ons
Topic: Anything with around 50 IO pins???
Replies: 12
Views: 6381

Re: Anything with around 50 IO pins???

The MCP23S17 SPI IO Expander chip has a mode (Checkout the HAEN bit in the IOCON register) that can allow the attachment of up to 8 MCP23S17 ICs to a single chip select pin. Since the RPI SPI peripheral has two chip select pins, you can attach upto 16 MCP23S17 chips to the RPI over SPI. Thats (16*16...
by halhertani
Sun Apr 20, 2014 6:38 pm
Forum: HATs and other add-ons
Topic: mmaping into /dev/mem clarification
Replies: 3
Views: 8257

Re: mmaping into /dev/mem clarification

Thanks jojopi and joan for your clarifications! I just took a look at the BCM2835 C Library apparently it also uses memory allocation using the "posix_memalign" function.

I will experiment with these approaches.
by halhertani
Fri Apr 18, 2014 9:22 pm
Forum: HATs and other add-ons
Topic: mmaping into /dev/mem clarification
Replies: 3
Views: 8257

mmaping into /dev/mem clarification

Hello all, I was reviewing some of the C code for the gertboard and I noticed that the GPIO/SPI/UART registers are being accessed directly by "mmaping into /dev/mem". I fully understand the concept....i.e. allocating 4096 bytes (page size) on a page boundary and then using mmap to map a specific reg...
by halhertani
Wed Apr 16, 2014 10:23 am
Forum: C/C++
Topic: Qt or GTK on Raspian Wheezy
Replies: 7
Views: 17520

Re: Qt or GTK on Raspian Wheezy

I managed to successfully cross compile GTK+ 3 & QT4 applications for the RPi on my PC. My approach in both cases is purely makefile based i.e. i.m not using pkg-config nor qmake.... Because the projects are makefile based you can easily import them into Eclipse as Makefile projects...or do what I d...
by halhertani
Mon Nov 04, 2013 5:03 pm
Forum: C/C++
Topic: SPI communication
Replies: 1
Views: 8749

Re: SPI communication

With I2C, each slave device has an address and the master chip (microcontroller or RPi) must first send the address of the device of interest to initiate communication with it. In SPI there's no such slave device address. Instead, every SPI slave device has an active low chip(slave) select pin that ...
by halhertani
Thu Oct 03, 2013 5:18 pm
Forum: Automation, sensing and robotics
Topic: Home automation with RPI for control wired "things"
Replies: 43
Views: 24799

Re: Home automation with RPI for control wired "things"

Dear friend, last night :D I turned on a led using my Raspberry Pi from my PC that is in same LAN of the RPi, using the line command: gpio -g mode 4 out gpio -g write 4 1 with the led connected on pin #4 of the Raspberry. First step is ok, next step is create the webserver for command the led from ...
by halhertani
Tue Oct 01, 2013 8:05 pm
Forum: Automation, sensing and robotics
Topic: Home automation with RPI for control wired "things"
Replies: 43
Views: 24799

Re: Home automation with RPI for control wired "things"

crystal 13, the socket programming approach I mentioned can work over WiFi or wired Ethernet...basically so long as you have a local area network (LAN) connection of some sort....just as required for internet/web access. If Each Raspberry Pi / Arduino is connected to the same LAN through either a wi...
by halhertani
Mon Sep 30, 2013 5:47 pm
Forum: HATs and other add-ons
Topic: Yet Another IO Expansion Board for the Raspberry Pi
Replies: 0
Views: 1044

Yet Another IO Expansion Board for the Raspberry Pi

Hello All, I've recently built a new IO Expansion board for the Raspberry Pi. The board has three main chips on board: i) An MCP23017 I2C GPIO Expander chip that provides 2 8-pin ports (16 GPIO) ii) A PCA9685 providing 16 12-bit PWM Channels with variable frequencies from 20-1000Hz . These 16 pins c...
by halhertani
Mon Sep 30, 2013 4:24 pm
Forum: Automation, sensing and robotics
Topic: Home automation with RPI for control wired "things"
Replies: 43
Views: 24799

Re: Home automation with RPI for control wired "things"

crystal13, Have you considered using socket programming to make the RPi's talk? Just put every RPi on the network with a wireless USB WiFi dongle and run two servers on the central RPI, The webserver (Apache/Lighttpd/Nginx e.t.c) that displays data on a website as well as another server..that listen...
by halhertani
Mon Aug 05, 2013 6:10 pm
Forum: C/C++
Topic: cross-debugging problem
Replies: 15
Views: 16495

Re: cross-debugging problem

rasp87, The links are active. You can also just go to http://www.hertaville.com and select the appropriate tutorial from the top menu. For my cross development tutorial I use Crunchbang Linux directly on my PC. I used to run Kubuntu in a VM but but don't do that anymore. Here's a tutorial on how to ...
by halhertani
Mon Aug 05, 2013 7:44 am
Forum: C/C++
Topic: cross-debugging problem
Replies: 15
Views: 16495

Re: cross-debugging problem

rasp87, I recently made the switch to use only Linux on my PC. While I'm aware that windows versions of the Raspberry Pi cross-compiler do exist, I highly recommend that you try running Linux on your PC either directly on hardware or via a virtual machine. It makes things much easier & helps one get...
by halhertani
Thu Jul 25, 2013 11:18 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Interfacing the Raspberry Pi to the MCP3008 ADC Chip in C++
Replies: 0
Views: 903

Interfacing the Raspberry Pi to the MCP3008 ADC Chip in C++

I've recently posted my experiences interfacing the Raspberry Pi to an SPI ADC chip (MCP3008) using spidev & C++. I hope that others find it useful. http://hertaville.com/2013/07/24/interf ... i-using-c/
by halhertani
Sun Jul 21, 2013 11:56 pm
Forum: C/C++
Topic: Cross building gtk+-3.0 applications
Replies: 1
Views: 1208

Re: Cross building gtk+-3.0 applications

I managed to cross compile gtk+ 3.0 applications for the RPi on a Linux PC. Instructions are available here http://hertaville.com/2013/07/19/cross- ... pberry-pi/
by halhertani
Sun Jul 21, 2013 11:54 pm
Forum: C/C++
Topic: GTK for GUI on Raspberry Pi
Replies: 13
Views: 11501

Re: GTK for GUI on Raspberry Pi

I had some success cross compiling GTK applications (on a Linux PC) using the instructions available here http://hertaville.com/2013/07/19/cross-compiling-gtk-applications-for-the-raspberry-pi/ . I still do recommend native compilation of GTK applications on the Raspberry Pi, even if it takes a whil...
by halhertani
Tue Apr 02, 2013 1:38 am
Forum: C/C++
Topic: Error when setting cross compiling in Eclipse
Replies: 2
Views: 1172

Re: Error when setting cross compiling in Eclipse

The problem is that eclipse doesn't quite see the PATH variable which should include the directory to the bin folder on your toolchain. Try starting eclipse from the command line using "eclipse &". When you do that eclipse will detect the path variable and will be able to find the cross compiler. I ...
by halhertani
Mon Mar 25, 2013 3:13 pm
Forum: C/C++
Topic: System calls or buffered calls for sysfs I2C/SPI ?
Replies: 4
Views: 3511

Re: System calls or buffered calls for sysfs I2C/SPI ?

mmi, Thank you for your explanation! I've seen many sysfs gpio examples that use buffered calls, but typically gpio control is achieved in these examples is by a sequence of commands fopen()/fwrite()/fclose(). So for example to change the state of an output pin one opens (fopen) the correct "/sys/cl...
by halhertani
Sun Mar 24, 2013 5:53 pm
Forum: C/C++
Topic: System calls or buffered calls for sysfs I2C/SPI ?
Replies: 4
Views: 3511

System calls or buffered calls for sysfs I2C/SPI ?

Hello I read in a few places that its better to use system calls (in C ) such as open()/read()/write() than buffered calls such as fopen()/fread()/fwrite()/fprintf() (& ifstream/ofstream in C++) to access sysfs devices such as I2C/SPI (/dev/i2c-x && /dev/spidev-0.x) in a linux system. Can someone ve...
by halhertani
Fri Jan 25, 2013 8:30 pm
Forum: C/C++
Topic: GNU C/C++ Cross Compiler + Eclipse Development Environment
Replies: 42
Views: 40424

Re: GNU C/C++ Cross Compiler + Eclipse Development Environme

why are you using sudo all the time when you're only writing to your own files in your $HOME directory? am i missing something there, or are you too used to ubuntu :lol: also why are you using linaro instead of bcm2708hardfp - i didn't think linaro was actually any faster on armv6 (makes a differen...
by halhertani
Fri Jan 25, 2013 8:15 pm
Forum: C/C++
Topic: GNU C/C++ Cross Compiler + Eclipse Development Environment
Replies: 42
Views: 40424

Re: GNU C/C++ Cross Compiler + Eclipse Development Environme

Ok, so im successfully cross compiling. 2 questions Can i save the raspberry pi settings in eclipse so i don`t have to add the includes/library paths every time i want to start a new program? Can i use the wiringPi headers in eclipse? msmithy, You can create a generic project with all the settings ...

Go to advanced search