Go to advanced search

by Redrobes
Wed Feb 04, 2015 7:06 pm
Forum: C/C++
Topic: How do I learn C
Replies: 33
Views: 4724

Re: How do I learn C

Never used these guys but if amazon is out then its available at this one.

http://www.bookdepository.com/C-Program ... 0131103627

Everyone who programs in C should have access to a copy.
by Redrobes
Fri Jan 30, 2015 12:21 pm
Forum: C/C++
Topic: How do I learn C
Replies: 33
Views: 4724

Re: How do I learn C

You need a raspberry pi running and ideally it boots into a shell or you start a terminal shell from the GUI. Then you need any text editor. You can use geany with the full GUI / IDE etc but I think doing a small program with just a text editor strips away all the confusing fluff and leaves you with...
by Redrobes
Thu Jan 22, 2015 1:29 pm
Forum: C/C++
Topic: Write data to gpio at 44.1 kbps
Replies: 2
Views: 718

Re: Write data to gpio at 44.1 kbps

What your saying you want to do is insane and if you go through with it then you will just end up destroying your relays. Even a bass bump would send a few hundred transitions to your relay. What you need to do is to find the low pass filter of the RMS of the waveform (the waveforms power) and then ...
by Redrobes
Wed Jan 21, 2015 5:57 pm
Forum: C/C++
Topic: interfacing ADC to raspberry
Replies: 2
Views: 975

Re: interfacing ADC to raspberry

I wrote a driver you can use if you dont want to go via python or the memory device.

See:
http://www.raspberrypi.org/forums/viewt ... 33&t=32152
by Redrobes
Mon Nov 03, 2014 2:38 pm
Forum: Other projects
Topic: Outside long time timelapse
Replies: 5
Views: 4109

Re: Outside long time timelapse

Since you want a years worth and say that you want 5 mins of video for that footage then at 25fps thats about 1 frame per hour for a year. So if you can make a car battery powered timer circuit that powers a relay for your 12V to 5V PSU then you can set it to power up once per hour. The raspi could ...
by Redrobes
Sun Oct 19, 2014 10:07 am
Forum: C/C++
Topic: C using MMAP I/O for raspberry pi
Replies: 6
Views: 2854

Re: C using MMAP I/O for raspberry pi

I think you may need an == instead of = as well. Maybe. Its hard to read the code like that. Looks to me like you need to set the GPIO_CLR value in which case putting that in a while loop seems like it might loop forever. Using macros like this is poor style. You should only do this if you need the ...
by Redrobes
Thu Oct 16, 2014 10:40 pm
Forum: C/C++
Topic: uint8_t holding '\8'
Replies: 12
Views: 1968

Re: uint8_t holding '\8'

Relevant post:
http://developerblog.redhat.com/2014/10 ... zer-ubsan/

Not sure that this specific input is something its designed to catch but maybe in the future we will say the solution to your issue is to turn on the undefined behaviour sanitizer.
by Redrobes
Tue Oct 14, 2014 12:41 am
Forum: Raspbian
Topic: Raspian images from mirrors.
Replies: 9
Views: 5186

Re: Raspian images from mirrors.

The raspi foundation does appear to have a great service provider and is doing a fantastic job at hosting all the tools, images and repos for the board - not to mention having a working forum. Your right - its probably a non - issue. Its just that storage is cheap and the repos are already mirrored ...
by Redrobes
Sun Oct 12, 2014 11:38 pm
Forum: Raspbian
Topic: Raspian images from mirrors.
Replies: 9
Views: 5186

Re: Raspian images from mirrors.

No I havent had an issue with the downloads page and I did ask this question at the end of a different question which was related but not the same. Still, after all of this nobody has yet posted an answer. So I take it there are no mirrored copies of the images through a source other than a) torrent...
by Redrobes
Sun Oct 12, 2014 2:28 pm
Forum: Raspbian
Topic: Raspian images from mirrors.
Replies: 9
Views: 5186

Raspian images from mirrors.

Does anyone have a list of mirror URLs for the latest raspian images. To be clear this is not the raspian repositories but the SD card images. The 1Gb zips or the 3Gb IMG files ? I know they are available from raspberrypi.org but that is not what I am asking about. If the normal downloads page is un...
by Redrobes
Mon Oct 06, 2014 2:08 pm
Forum: C/C++
Topic: tedious boost problem with standard deviation
Replies: 8
Views: 1706

Re: tedious boost problem with standard deviation

I cant specifically help, not having boost etc loaded up right now but the issue is that one of the boost headers has forward declared the tag::variance type but has failed to fully define it. I would expect that there is another header that you would need. My guess is that accumulators/accumulators...
by Redrobes
Tue Sep 30, 2014 7:45 pm
Forum: C/C++
Topic: uint8_t holding '\8'
Replies: 12
Views: 1968

Re: uint8_t holding '\8'

See the latest (free) working draft: https://isocpp.org/files/papers/N3690.pdf page 26 -> "Escape sequences in which the character following the backslash is not listed in Table 7 are conditionally-supported, with implementation-defined semantics." I.e. It's an undefined escape sequence so all bets ...
by Redrobes
Fri Sep 26, 2014 12:40 pm
Forum: C/C++
Topic: how can i render an image from byte array
Replies: 2
Views: 1105

Re: how can i render an image from byte array

The BMP file format has a bitmap header and a bitmap info header then if you set those up correctly then you fwrite out your RGB bytes in the selected format and write out the termination characters to end the file. In Windows you can do this using some API calls. In linux / Raspberry PI land you ca...
by Redrobes
Fri Sep 26, 2014 12:13 pm
Forum: C/C++
Topic: When do you use size_t and int?
Replies: 3
Views: 1005

Re: When do you use size_t and int?

That article doesnt seem to highlight the most important feature of size_t enough. Size_t is always unsigned and at least 16 bits but otherwise its bit depth is not specified as part of the language. Neither is unsigned int for that matter. But it is not always the case that unsigned int and size_t ...
by Redrobes
Fri Aug 22, 2014 10:20 pm
Forum: C/C++
Topic: Camera module: set exposure to off not working
Replies: 3
Views: 1457

Re: Camera module: set exposure to off not working

No probs. When I code I have gotten into the habit of naming vars with units now. So I would have named that shutter_speed_in_uS or something. Hopefully someone will file that bug and get that fixed.
by Redrobes
Fri Aug 22, 2014 10:02 pm
Forum: C/C++
Topic: Improving the using of const_cast
Replies: 6
Views: 1087

Re: Improving the using of const_cast

First of all its not the full code since you have used (*this).items. Basically the header declaring the class of stat data has a member called "items". The calling of this function will alter items as a byproduct of the call. Therefore its not const at all. So you should not declare it as such. The...
by Redrobes
Tue Aug 19, 2014 5:42 pm
Forum: C/C++
Topic: Camera module: set exposure to off not working
Replies: 3
Views: 1457

Re: Camera module: set exposure to off not working

Shutter speed of 100 sounds low. Is that 100 uS or does the api specify it as a fraction of a sec. The command line raspistill is in uS and I use something like 10,000 or 100,000 kind of range. Maybe with exposure not on auto its using the too short shutter speed and giving a black image.
by Redrobes
Mon Aug 04, 2014 11:51 am
Forum: Camera board
Topic: raspistill -t option and colour
Replies: 5
Views: 1168

Re: raspistill -t option and colour

Thanks Gordon. It sounds like this is known behavior and that there is such as thing as too short and ill just assume that its necessary to have some delay before the camera is ready. Maybe the documentation or the --help should reflect that the CCD needs time to stabilize and that 750 or 1000 is a ...
by Redrobes
Sun Aug 03, 2014 5:19 pm
Forum: Camera board
Topic: raspistill -t option and colour
Replies: 5
Views: 1168

raspistill -t option and colour

Hi, I have a couple of cameras on pi's and I have a small identical problem with all of them. I wondered if anyone could point me at the documentation for why its happening, confirm that other people see it, or maybe post an explanation. The issue is that if I run the cameras with raspistill and use...
by Redrobes
Thu Jun 26, 2014 10:59 pm
Forum: Teaching and learning resources
Topic: 3D Model of Pi B and Cam board
Replies: 0
Views: 1575

3D Model of Pi B and Cam board

A general resource for anyone really. An (Wavefront) OBJ type format model of a model B with SD card and Camera board. I made these for myself to virtually design boxes and fittings but thought that others would possibly find these useful. Units are in mm, objects contain shape info but no textures ...
by Redrobes
Tue Apr 01, 2014 2:13 pm
Forum: C/C++
Topic: timing using CPU cycles at runtime
Replies: 2
Views: 1526

Re: timing using CPU cycles at runtime

I wasn't aware that there was a CPU cycle counter on the Raspi but I did know of the 1us hardware timer/counter on the PI which is accessible through a driver (which I have used and works well). I am not sure if were talking about the same thing or I am lacking some knowledge about a different one. ...
by Redrobes
Mon Mar 31, 2014 10:31 pm
Forum: C/C++
Topic: Questions about implementing C
Replies: 15
Views: 4496

Re: Questions about implementing C

The main reason makefiles are so incomprehensible is that there is usually only that one guy who knows what hes doing and the rest just take another makefile and hack it about a bit without knowing exactly what they are doing. Make the syntax is bloody awful but then its still the best language for ...
by Redrobes
Thu Jan 09, 2014 6:09 pm
Forum: C/C++
Topic: General Questions in Project Design and Development
Replies: 16
Views: 3582

Re: General Questions in Project Design and Development

I looked at the spec and wrote a GPIO driver and use it to toggle pins and do stuff. So its not that big a deal. I also program PICs and I have used it to interface the raspi to some 12F629's to send some data to them.

http://www.raspberrypi.org/phpBB3/viewt ... 33&t=32152
by Redrobes
Thu Jan 09, 2014 6:02 pm
Forum: C/C++
Topic: GPIO matrix keyboard driver
Replies: 3
Views: 2020

Re: GPIO matrix keyboard driver

Sounds like you might use the internal pull up resistors or add some high value ones of your own to one half of the IO bank and then set them to inputs. On the other half you set them as outputs and set them all high and put in some lower value resistors (say 1/10th value). Then sequentially lower o...
by Redrobes
Sat Dec 21, 2013 12:15 pm
Forum: General discussion
Topic: raspberry pi on/off
Replies: 11
Views: 2399

Re: raspberry pi on/off

I'll just chip in and say when I built myself a new kernel and installed it, it has since rebooted after shutdown in a similar manner to that posted by OP. I have not tried to fix it and still don't know why its doing it either. I use "sudo shutdown -h now". It runs through the power down scripts an...

Go to advanced search