Go to advanced search

by topguy
Mon Apr 14, 2014 12:22 pm
Forum: C/C++
Topic: Variable inside quotes
Replies: 5
Views: 1327

Re: Variable inside quotes

Rewrite printCharAsBinary to put the string into an array. void getCharAsBinary(unsigned char ch, char *out) { int i; for (i = 0; i < 8; i++) { out[i] = (ch & 0x80) ? "1" : "0"); ch <<= 1; } } For creating the final string I would have used snprintf but that is a personal choice. char buffer[512]; c...
by topguy
Mon Apr 14, 2014 12:00 pm
Forum: General discussion
Topic: Serial Port Changing
Replies: 9
Views: 4166

Re: Serial Port Changing

You can write an "udev" rule to give you usb-device the same name. Create a file "/etc/udev/rules.d/000_my.rules" containing. KERNEL=="ttyUSB[0-9]*", SYSFS{idVendor}=="0403", SYSFS{idProduct}=="6001", NAME="myserial" I've chosen the values for Vendor and Product from one of the more common usb2seria...
by topguy
Fri Apr 11, 2014 1:01 pm
Forum: Beginners
Topic: How to connect Speaker to Pi ?
Replies: 10
Views: 28137

Re: How to connect Speaker to Pi ?

The picture is not good, are these buzzers or speakers.

A speaker only handles analog signals for creating sound...
The GPIO pins are only able to produce digital signals 0 and 1 which makes for pretty bad sound.

So what are you really trying to do here ?
by topguy
Fri Apr 11, 2014 12:45 pm
Forum: Advanced users
Topic: Command line retrieval of Hardware info
Replies: 3
Views: 31887

Re: Command line retrieval of Hardware info

If you want to have portable code then you should avoid using cli-tools since you'll never know if they are installed or not.

A better solution is probably to use the information available from the Linux kernel in /proc and /sys filesystems.
- /proc/cpuinfo
- /proc/meminfo
by topguy
Fri Apr 11, 2014 12:37 pm
Forum: Beginners
Topic: MySQL databas in Rpi v2
Replies: 6
Views: 963

Re: MySQL databas in Rpi v2

Just use the instructions for a LAMP server and forget about installing web-server (apache or others ) and PHP.

Or look at the other threads about mysql: http://www.raspberrypi.org/forums/viewt ... 28&t=54839
by topguy
Thu Apr 10, 2014 11:14 am
Forum: Camera board
Topic: Can we use any other camera module than raspi cam module?
Replies: 5
Views: 2778

Re: Can we use any other camera module than raspi cam module

If you search this forum you should find a lot of threads about using Pi with standard webcams.

The interface used for most video devices in Linux is "Video4Linux2" aka. v4l2 (http://en.wikipedia.org/wiki/Video4Linux#Version_2) which is supported my many applications and libraries.
by topguy
Thu Apr 10, 2014 9:26 am
Forum: General discussion
Topic: Raspberry Pi and acr122u NFC reader.
Replies: 33
Views: 44403

Re: Raspberry Pi and acr122u NFC reader.

libnfc comes with a lot of examples. This one: https://code.google.com/p/libnfc/source/browse/examples/nfc-anticol.c Selects a card and gives you the UID. The UID of the cards are used for anti-collision if you have multiple cards in front of the antenna, so its the first information you get from th...
by topguy
Thu Apr 10, 2014 9:12 am
Forum: Camera board
Topic: Access Pi remotely over internet?
Replies: 1
Views: 545

Re: Access Pi remotely over internet?

Where is the video stored ? On the Pi or on the PC ? This is a two part problem. 1: Find a suitable networking service that will give you access to files. - FTP ( probably not the best solution ) - HTTP ( you need to set up a web-server on the Pi, but then its very easy to access it later, any web-b...
by topguy
Thu Apr 10, 2014 8:39 am
Forum: Graphics programming
Topic: Pyqt on raspberry pi
Replies: 3
Views: 38077

Re: Pyqt on raspberry pi

The command is not called "pyquic4" it only "pyuic4".

And it should be in the package "pyqt4-dev-tools".
by topguy
Tue Apr 08, 2014 11:31 am
Forum: General programming discussion
Topic: Accelerated Framebuffer Webkit
Replies: 70
Views: 46644

Re: Accelerated Framebuffer Webkit

summershere wrote:Not sure if this is the best thread to post this on, but you guys seem to know what you're talking about and it's all kind of relevant :)
I probably would have chosen to hijack the "gst-omx plugin" thread or at least found something relevant in the Python sub-forum.
by topguy
Tue Apr 08, 2014 11:27 am
Forum: Networking and servers
Topic: How does android app display raspberry pi mysql information?
Replies: 1
Views: 603

Re: How does android app display raspberry pi mysql informat

I think we have too little information to give intelligent answers.
What are you running as web-server ?
Are you only trying to see the data coming from the app so far ?
by topguy
Tue Apr 01, 2014 9:32 am
Forum: General discussion
Topic: Start X program in terminal at boot without x desktop
Replies: 11
Views: 12103

Re: Start X program in terminal at boot without x desktop

If your program is made for X-Windows then you need X-Windows running for it to start. but.. you dont have to start a full windows desktop which happens when you run "startx", you can just start the Xserver. "man xserver" will give you a full list of options. But in theory the following script sould...
by topguy
Mon Mar 31, 2014 8:50 am
Forum: C/C++
Topic: Raspberry and Qt Creator
Replies: 4
Views: 1858

Re: Raspberry and Qt Creator

Thanks, so a method is: I copy the qt project on Raspberry and then compile with qt. I think there will be a lot of code to fix. Why do you think that ? You are already using GCC (mingw?) on windows it seems so there shouldn't be too much rewrite due to compiler differences. A main point for using ...
by topguy
Thu Mar 27, 2014 2:59 pm
Forum: Beginners
Topic: problem with makfile
Replies: 24
Views: 4255

Re: problem with makfile

"sudo apt-get" is probably not going to work on a Windows 7 machine.... I don't know what "gcc command prompt" is but I guess you will need a windows version of "make" somewhere. http://gnuwin32.sourceforge.net/packages/make.htm And you'll probably have to edit the makefile to point to where your co...
by topguy
Thu Mar 27, 2014 12:39 pm
Forum: Python
Topic: Android code editor for Python
Replies: 2
Views: 884

Re: Android code editor for Python

Putting the words "python editor" into the search box at play.google.com will give you results. Either test them out yourself or read their description and reviews.

You might consider using a separate ftp/scp program to sync files witho your Pi, or event better look for git/github support.
by topguy
Fri Mar 21, 2014 4:22 pm
Forum: Graphics programming
Topic: cross-compile qt application for rpi
Replies: 2
Views: 8821

Re: cross-compile qt application for rpi

A lot of patience... Seriously, its not the easiest task to set up a cross-compiling environment and Qt just adds to the complexity. Personally I would develop my application on the "PC" and then copy/sync the code over to the Pi and build it there. Unless you are planning to make a huge application...
by topguy
Fri Mar 21, 2014 2:38 pm
Forum: Beginners
Topic: Permissions Error
Replies: 3
Views: 556

Re: Permissions Error

This file is only editable with "root" privileges, the normal way of getting that is to use "sudo". example: sudo nano /etc/samba/smb.conf This is the recommended way of accessing/changing any system configuration files. If you change the file-permissions instead you are opening up for unauthorized ...
by topguy
Fri Mar 21, 2014 2:04 pm
Forum: General programming discussion
Topic: auto run openFrameworks on start up but not SSH sign in
Replies: 5
Views: 2155

Re: auto run openFrameworks on start up but not SSH sign in

If not running X then Rattus suggestion is a good one. It might be missing " around "/dev/tty1" that is the problem. You should maybe make a testscript that verify it works before adding it to your startup script. #!/bin/bash echo "tty = $(tty)" if [ $(tty) == "/dev/tty1" ]; then echo "We have a mat...
by topguy
Thu Mar 20, 2014 3:23 pm
Forum: Beginners
Topic: Cross compiling for raspberry pi
Replies: 1
Views: 420

Re: Cross compiling for raspberry pi

Kernel modules are quite "fond" of their kernel, any change between the system that compiled the kernel and the one that compiled the module can give unintended side effects. Unless you are 100% sure that you are using the same kernelsource ( with the same patches ) and the same crosscompiler as the...
by topguy
Thu Mar 20, 2014 2:42 pm
Forum: General programming discussion
Topic: Accelerated Framebuffer Webkit
Replies: 70
Views: 46644

Re: Accelerated Framebuffer Webkit

- How much memory on your Pi ?
- Which URL are you trying ?

Web pages with lot of images and Javascript will be slow.
by topguy
Thu Mar 20, 2014 2:25 pm
Forum: General programming discussion
Topic: auto run openFrameworks on start up but not SSH sign in
Replies: 5
Views: 2155

Re: auto run openFrameworks on start up but not SSH sign in

Can we assume that you are automatically starting X-windows and logging in as "Pi" user when the Pi boots ? If you search this forum for "lxde autostart" you will find many threads containing tips how to get stuff to automatically run when you start X-windows and LXDE desktop. This will not interfer...
by topguy
Thu Mar 20, 2014 2:20 pm
Forum: General discussion
Topic: PI's IP ADDRESS
Replies: 5
Views: 991

Re: PI's IP ADDRESS

Did you set up "Internet connection sharing" or "network bridging" on the network interface on the PC ? If not, then the Pi will not receive any ip-adress when sending DHCP requests. Sevaral post on this forum have discussed similar problems, this is one: http://www.raspberrypi.org/phpBB3/viewtopic....
by topguy
Thu Mar 20, 2014 1:48 pm
Forum: General discussion
Topic: PI's IP ADDRESS
Replies: 5
Views: 991

Re: PI's IP ADDRESS

A: Is the Pi connected to the same router as your PC ? B: Or is it connected only to the PC ? If A: - Manually by pinging every address on your network. Usually you can guess from the IP-adress of your PC and/or any other devices on the same network. - Checking the router if it has a list over all D...
by topguy
Mon Mar 17, 2014 11:35 am
Forum: General discussion
Topic: Raspberry Pi and acr122u NFC reader.
Replies: 33
Views: 44403

Re: Raspberry Pi and acr122u NFC reader.

Could it be that you have multiple versions of libnfc installed ? The one you make and install yourself should en up in "/usr/local/lib", if you have another installed in "/usr/lib" then its not unlikely that the wrong one is being used. oops. no.. the path in the error message suggests that the co...

Go to advanced search