Go to advanced search

by experix
Wed Jan 13, 2016 4:28 pm
Forum: C/C++
Topic: File handling and data acquisition on separate cores
Replies: 9
Views: 1252

Re: File handling and data acquisition on separate cores

Minimizing the work other parts of the program are doing, expecially OS calls, is a good idea. But if it isn't enough, or you can't get necessary work done without causing gaps in the data, how about fooling around with CPU affinity and priority of the data acquisition thread? I would like to hear a...
by experix
Tue Jan 12, 2016 8:25 pm
Forum: Advanced users
Topic: Position detection system
Replies: 6
Views: 1792

Re: Position detection system

Where do they have TV that can make this a worthwhile project? Certainly not in US. I don't have a TV. Public radio is all I need. I looked up your forum info but it doesn't say where you are. Anyway, image processing might work if you wear something with a distinctive color (or is it 'colour' where...
by experix
Fri Jan 08, 2016 9:32 pm
Forum: Astro Pi
Topic: C programming sense-hat
Replies: 3
Views: 5152

C programming sense-hat

I installed the sense-hat software and found 2 examples of C programming in /usr/src/sense-hat/. Have not found device documentation yet except for a block diagram and the schematic PDF. I want to write C programs to operate it. Are there more resources available? How about a list of ioctl's, librar...
by experix
Thu Jan 07, 2016 8:18 pm
Forum: General discussion
Topic: Input On Possible Pi Project Please
Replies: 5
Views: 833

Re: Input On Possible Pi Project Please

Maybe you should get legal advice in case there are laws intended to prevent terrorist activities and such, but what you propose looks to me like the same principle as observing the train and phoning a bunch of people to tell them, which I doubt would be illegal. To avoid trouble I would rule out th...
by experix
Thu Jan 07, 2016 5:42 pm
Forum: General discussion
Topic: thread timing exploration tool
Replies: 2
Views: 536

Re: thread timing exploration tool

allfox, From my understanding, you mean if the interval is too small, Pi would have difficulty to catch up, is that right? If a thread attempts to regulate its timing by means of pthread_cond_timedwait or similar (by the way I erroneously said 'pthread_timed_wait' in my original post), it is suspend...
by experix
Wed Jan 06, 2016 8:50 pm
Forum: General discussion
Topic: thread timing exploration tool
Replies: 2
Views: 536

thread timing exploration tool

After seeing posts that asked for information on thread timing, I made a script to explore this issue via experix ( http://experix.sourceforge.net ). Briefly, the experix thread/o command launches a thread that executes the given experix script. Within that script, thread/w executes a pthread_timed_...
by experix
Sat Jan 02, 2016 5:50 pm
Forum: Automation, sensing and robotics
Topic: Clap detection in Pi
Replies: 1
Views: 1012

Re: Clap detection in Pi

I think 'clap' is a slang term for one of the venereal diseases :lol: But if you are wanting to detect applause, maybe you can start by looking at the power spectrum or Fourier transform of applause recorded in the context in which you want to detect it, and figure out what features distinguish it. ...
by experix
Tue Dec 29, 2015 3:46 pm
Forum: General discussion
Topic: Good keyboard and mouse for the Raspberry?
Replies: 10
Views: 18921

Re: Good keyboard and mouse for the Raspberry?

If you want a touchpad, test it before you buy (or get assurance it will work or you can bring it back). I have a keyboard-touchpad combo that works very well on my Trisquel Linux Thinkpad, but on the RPi the touchpad is dysfunctional. Driver issue, I guess-- I haven't tried to resolve it.
by experix
Mon Dec 28, 2015 6:32 pm
Forum: Off topic discussion
Topic: Power usage from battery
Replies: 21
Views: 2318

Re: Power usage from battery

I don't know what 5.0mAv means. "Av" suggests amps times volts, i.e. this would be the lamp power draw, and "m" must mean "milli", and if a 20 v battery is powering something at 5 milliwatts, the current from the battery is 0.25 mA. Four of them brings it to 1.0 mA, and a 7 Ah battery should last 70...
by experix
Thu Dec 24, 2015 5:26 pm
Forum: General discussion
Topic: Are "HOWTO" posts welcome?
Replies: 14
Views: 1892

Re: Are "HOWTO" posts welcome?

This sent me looking around to find out what "make an instructables" might mean. For others as ignorant as I was, here's the answer: http://www.instructables.com
by experix
Tue Dec 22, 2015 6:05 pm
Forum: C/C++
Topic: Detecting a Key down
Replies: 20
Views: 3621

Re: Detecting a Key down

My earlier post calls showkey a 'bash command'. That's careless. It's a program. The output of strace -o /tmp/showkey.trace showkey may tell you what you need. Each key press or release results in a read from /proc/self/fd/0 which obtains 1 or 2 bytes depending on the key (anyway that's what I saw)....
by experix
Tue Dec 22, 2015 5:12 pm
Forum: C/C++
Topic: Detecting a Key down
Replies: 20
Views: 3621

Re: Detecting a Key down

see man showkey
This seems to be doing what you want, except it's a bash command, not a function you can put in your c program. Maybe you can find the source for it and figure out how to incorporate the relevant code.
by experix
Tue Dec 22, 2015 5:02 pm
Forum: C/C++
Topic: Changing a variable only after time elapsed
Replies: 4
Views: 798

Re: Changing a variable only after time elapsed

Maybe you can make most of the things run off of one timer (see man setitimer), and the 'BathZ' one run off of another timer. I can't really figure out what you are trying to do. Your remark about Pi's not keeping time on their own may not be relevant. They will keep time as long as they are booted ...
by experix
Mon Dec 21, 2015 4:48 pm
Forum: Camera board
Topic: Two cameras on one Pi2 ?
Replies: 3
Views: 1228

Re: Two cameras on one Pi2 ?

USB- or web-connected cameras will solve most of your issues.
by experix
Sat Dec 19, 2015 4:10 pm
Forum: General programming discussion
Topic: change terminal width for readline only
Replies: 2
Views: 1253

Re: change terminal width for readline only

Not even if you change the window size before the first call to readline? I think that would work-- it seems to me I was doing that in a previous version. But changing the terminal size overall isn't a great solution, which is part of why I left this out of program init. I didn't see rl_set_screen_...
by experix
Fri Dec 18, 2015 9:25 pm
Forum: General programming discussion
Topic: change terminal width for readline only
Replies: 2
Views: 1253

change terminal width for readline only

I want readline to act like the terminal width is 80, when it is really 128. There seems to be no readline variable or function relevant to this. Using the TIOCSWINSZ ioctl in the program that is calling readline does not have the desired effect until I stop and restart the program in that terminal....
by experix
Fri Dec 18, 2015 5:10 pm
Forum: HATs and other add-ons
Topic: Gertbot / rpi how to input on/off signals ?
Replies: 1
Views: 3798

Re: Gertbot / rpi how to input on/off signals ?

Do you mean, like you have dozens of wires, each of which might be in one of two states ('on' or 'off', these being signified by different voltage levels on the wire), and you want to get the state of each wire? You can connect them to multiplexer inputs (with logic level shifting if required), and ...
by experix
Fri Dec 18, 2015 4:56 pm
Forum: C/C++
Topic: Make issue
Replies: 5
Views: 970

Re: Make issue

The RPi has no hardware clock. If it is connected to the network it can set its clock from that. Otherwise, each time it boots, the time it has is whatever the time was when it shut down. You can get file dates 'in the future' if you boot up, neglect to set the correct time, and obtain a file from s...
by experix
Wed Dec 16, 2015 3:40 pm
Forum: Graphics programming
Topic: how to move from fbdev to DRM?
Replies: 2
Views: 4134

Re: how to move from fbdev to DRM?

Thanks for the answers, -rst-,
I saw the Wikipedia article and a few other things and came to the same conclusion-- looks like for the person who merely wants to use a framebuffer to put pictures on the screen, it matters not whether /dev/fb0 is created by something called fbdev or drm.
by experix
Tue Dec 15, 2015 4:29 pm
Forum: Off topic discussion
Topic: Your first time coding experience
Replies: 38
Views: 5486

Re: Your first time coding experience

I'm nowhere near being the oldest kid on the block but I'm getting there. To get back to the OP's main question, as I read it-- I had a little bit of formal classwork in college, using Fortran, but mainly I am self-taught. When you can get your eyeballs on a good book and your fingers on some hardwa...
by experix
Fri Dec 11, 2015 7:28 pm
Forum: Graphics programming
Topic: how to move from fbdev to DRM?
Replies: 2
Views: 4134

how to move from fbdev to DRM?

From Linux Journal: The Linux framebuffer, once a bastion of innovation, is now on the chopping block, in favor of the Direct Rendering Manager (DRM) subsystem. The fbdev maintainer, Tomi Valkeinen, has asked everyone to stop submitting new fbdev drivers and to aim their efforts at DRM instead. I ha...
by experix
Thu Dec 10, 2015 7:22 pm
Forum: General discussion
Topic: How to expand memory spce for /usr/local/src
Replies: 9
Views: 1161

Re: How to expand memory spce for /usr/local/src

plug in a thumbdrive and mount it on /usr/local/src but then the original contents of /usr/local/src is not available. Will it work if you make a dir under /usr/local/src and mount the drive there? or mount the thumdrive somewhere, copy everything in /usr/local/src onto the thumdrive, then umount th...
by experix
Tue Dec 08, 2015 5:04 pm
Forum: Other projects
Topic: Raspberry pi central heating
Replies: 5
Views: 967

Re: Raspberry pi central heating

This is practically a request to design the system for you. I couldn't do that even if I had the time for it, since I have not seen your thermostat and bioler system, and anyway I have not done anything like that. But I guess you will need a relay that is driven from a chip that needs a periodic res...
by experix
Tue Dec 08, 2015 4:38 pm
Forum: General discussion
Topic: Why so old software versions using apt-get?
Replies: 5
Views: 1187

Re: Why so old software versions using apt-get?

What is the degree of oldness you have seen, in terms of release date, bug fixes and new features? If something seems stale based on comparing release dates, you can probably find a list of changes made in each release and figure out whether there is something that justifies going to the trouble of ...
by experix
Mon Dec 07, 2015 5:44 pm
Forum: Other projects
Topic: Raspberry pi central heating
Replies: 5
Views: 967

Re: Raspberry pi central heating

connecting the boiler directly using a reply to RPI Did you mean to say 'relay to RPI'? To start, you could take the wires that go from the switch in the thermostat to the boiler, and connect them to the 'normally-OFF' terminals on a relay that is specified for the maximum current that your thermos...

Go to advanced search