Go to advanced search

by Rene_is_I
Sat Apr 20, 2013 2:50 pm
Forum: General programming discussion
Topic: Writing to file Automatically
Replies: 5
Views: 1564

Re: Writing to file Automatically

Simplest might be to run a cron job once a minute that simply appends the date to a file. -Gordon As long as one is saving data to a file on the SD card, then there is always a chance of the Pi switching off due to flat batteries during the write which could cause data corruption. rpdom's solution ...
by Rene_is_I
Sat Apr 20, 2013 7:55 am
Forum: General programming discussion
Topic: Writing to file Automatically
Replies: 5
Views: 1564

Re: Writing to file Automatically

Hi Bronto Keep in mind that the Pi does not have a RTC and relies on a time server. Although writing to a file is not a bad idea, Murphy's law states that at least once the battery will die right in the middle of the write and potentially cause data loss on the SD card. Can you not connect the Pi to...
by Rene_is_I
Mon Apr 15, 2013 4:44 pm
Forum: Bare metal, Assembly language
Topic: DexBasic Source code
Replies: 28
Views: 6257

Re: DexBasic Source code

Happy Birthday Dex.
Party it up :D
by Rene_is_I
Sun Apr 14, 2013 8:17 pm
Forum: Bare metal, Assembly language
Topic: Multiple USB to Serial Converters
Replies: 8
Views: 2536

Re: Multiple USB to Serial Converters

Just tried my Symbol USB hand held barcode scanner and it does report a 32 digit serial number
and a 9 digit revision number.
by Rene_is_I
Sun Apr 14, 2013 7:37 pm
Forum: Bare metal, Assembly language
Topic: Multiple USB to Serial Converters
Replies: 8
Views: 2536

Re: Multiple USB to Serial Converters

Hi A Pi will do the job, it just depends on what you want to do with the data and what it is you are going to display and how. By how I mean in a Xwindows app, the CLI, via a web server? If the serial barcode readers are new, which I assume they are, did they not come with a programming chart? This ...
by Rene_is_I
Sun Apr 14, 2013 5:57 pm
Forum: Bare metal, Assembly language
Topic: Multiple USB to Serial Converters
Replies: 8
Views: 2536

Re: Multiple USB to Serial Converters

Hi plcman I don't know what barcode scanners you have, but the ones I've come across emulate a keyboard and are normally USB, however there are serial ones knocking about, perhaps these are the ones you are using? With serial barcode scanners, they don't send out just one character/byte so you can't...
by Rene_is_I
Thu Apr 11, 2013 2:38 pm
Forum: General programming discussion
Topic: Control of RPi using a webpage
Replies: 3
Views: 981

Re: Control of RPi using a webpage

If you are using php it means you are using a web server, have you checked the server logs?
I'm willing to bet it's a permission issue.
It would not be a very good server if it executed sudo.
by Rene_is_I
Wed Apr 10, 2013 8:52 pm
Forum: General programming discussion
Topic: How to best go about easily changing between static/DHCP
Replies: 9
Views: 1524

Re: How to best go about easily changing between static/DHCP

Depending on the distro you are using, it may well auto mount any storage devices so you can
just issue a 'mount' command then pipe it thru 'grep' to return anything related to a USB stick.
Yet another way is to 'cat' /proc/bus/usb/devices but I'm not sure if all distros have/use it.
by Rene_is_I
Wed Apr 10, 2013 8:44 pm
Forum: General programming discussion
Topic: How to best go about easily changing between static/DHCP
Replies: 9
Views: 1524

Re: How to best go about easily changing between static/DHCP

No problem.
Udev will trigger as soon as a USB device is connected so you just have to query it.
Good luck.
by Rene_is_I
Wed Apr 10, 2013 8:39 pm
Forum: General programming discussion
Topic: How to best go about easily changing between static/DHCP
Replies: 9
Views: 1524

Re: How to best go about easily changing between static/DHCP

My concern was that when the script ran it had not found/loaded the USB device and would therefore have 'missed' its opportunity to load from the USB device
That will depend on how you write your script.
I have edited my previous post, have a look as regards to using 'udevadm'
by Rene_is_I
Wed Apr 10, 2013 8:29 pm
Forum: General programming discussion
Topic: How to best go about easily changing between static/DHCP
Replies: 9
Views: 1524

Re: How to best go about easily changing between static/DHCP

@omega1 Will the USB device be found quick enough at startup so that on boot it can find it to get this file? Let's assume that the Pi first boots and starts with DHCP then only a few seconds later will the USB stick be found and IP.txt read and the new IP address applied. Will this present a proble...
by Rene_is_I
Wed Apr 10, 2013 8:13 pm
Forum: General programming discussion
Topic: How to best go about easily changing between static/DHCP
Replies: 9
Views: 1524

Re: How to best go about easily changing between static/DHCP

Hi omega1 Depending on the situation, you have several options: If the SD card is accessible then you could write a script that looks for a file on the SD card called something like IP.txt that the user can put there (created on a Windows machine and copied to the SD card) the user then puts the SD ...
by Rene_is_I
Wed Apr 10, 2013 7:56 pm
Forum: Bare metal, Assembly language
Topic: Non USB power to Pi
Replies: 5
Views: 4928

Re: Non USB power to Pi

@JohnBeardmore Can the housing be larger then the Pi itself? If so then simply make it that the USB connector is inside the housing then buy a corresponding USB cable, cut the other end of and plug it into the USB connector used to power the Pi. This saves you having to solder on the actual pcb and ...
by Rene_is_I
Wed Apr 10, 2013 7:50 pm
Forum: General programming discussion
Topic: Encrypt SD card content
Replies: 41
Views: 43286

Re: Encrypt SD card content

OK been doing some more reading on GPL etc and I think it works like this: You develop an app/range of apps that run on some distro. You can't stop someone making copies of that distro if it's GPL based, but your app/s may not be copied as you have decided to make them non-GPL and that is what you a...
by Rene_is_I
Wed Apr 10, 2013 7:18 pm
Forum: General programming discussion
Topic: Encrypt SD card content
Replies: 41
Views: 43286

Re: Encrypt SD card content

This is turning out to be a real interesting thread. I'm wondering just how one gets a definitive answer to this as there seems to be many interpretations. Considering how many devices use Linux these days, from set top boxes to IPTV servers to routers and even NAS boxes, not once have I seen any ac...
by Rene_is_I
Wed Apr 10, 2013 6:25 pm
Forum: General programming discussion
Topic: Encrypt SD card content
Replies: 41
Views: 43286

Re: Encrypt SD card content

@omega1
Which could be detailed in the instruction manual?
Yup, and if the buyer does not RTFM, well that's their problem. ;)
by Rene_is_I
Wed Apr 10, 2013 6:22 pm
Forum: General programming discussion
Topic: Can the GPIO Pins Detect Oscillation With a 555 Timer?
Replies: 3
Views: 1907

Re: Can the GPIO Pins Detect Oscillation With a 555 Timer?

vorsimex, I assume you are using the change in skin resistance method to detect when one is telling "porkies". If so, why not add a temperature sensor and a hygrometer to an ADC and send the output to the Pi as well. As both temperature and relative humidity also affect the skin's resistance, by mea...
by Rene_is_I
Wed Apr 10, 2013 6:12 pm
Forum: General programming discussion
Topic: Encrypt SD card content
Replies: 41
Views: 43286

Re: Encrypt SD card content

That way I understand it is, that you can sell a system that uses open source software as long as
you include the original copyright and credits.
by Rene_is_I
Wed Apr 10, 2013 3:01 pm
Forum: General programming discussion
Topic: Can the GPIO Pins Detect Oscillation With a 555 Timer?
Replies: 3
Views: 1907

Re: Can the GPIO Pins Detect Oscillation With a 555 Timer?

Hi vorsimex Yes the pi will be able to detect the output of the 555 provided you don´t exceed 3.3v on it´s inputs so if you are running the 555 off a higher voltage, either use a voltage divider on it´s output or run the 555 on 3.3v as well. However I can´t remember if the 555 will run on a supply a...
by Rene_is_I
Mon Apr 08, 2013 6:24 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 4022

Re: Another possible method to access GPIO

Hi duberry Nice find as it certainly highlights the ramifications of running a script as root and what works and what does not. I still think that the easiest and safest route is probably to change ownership of the gpio as I can't see doing this as a security risk whereas running a script or indeed ...
by Rene_is_I
Mon Apr 08, 2013 4:31 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 4022

Re: Another possible method to access GPIO

@rurwin That is some pretty useful info thank you. @Dexos An elf executable would do nicely infact that is what I do on x86 based platforms but I write it it asm and my arm asm is pretty poor and so is my C. One would still have the permission problems though as the elf would need to run as root or ...
by Rene_is_I
Sun Apr 07, 2013 4:27 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 4022

Re: Another possible method to access GPIO

The beauty of Linux is there are, as you say, many ways to skin the cat (much to your feline's dismay) :o My original motivation was to provide a main script that simply installs the required four scripts to a suitable location, make them executable and perhaps chown the gpio and it's all done. (Ano...
by Rene_is_I
Sun Apr 07, 2013 4:03 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 4022

Re: Another possible method to access GPIO

If one has to put the functions into separate files, then surely there is no advantage to my original idea of using scripts? And as rurwin correctly pointed out, the aliases aren't even needed. So it's just a case of making the 4 scripts, saving them somewhere in $PATH and they are ready to use on t...
by Rene_is_I
Sun Apr 07, 2013 3:44 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 4022

Re: Another possible method to access GPIO

Hi Bakul Shah I did originally think of using functions but then one has to export them if we want to use them on the cli (one at a time) or in another script. The problem I encountered is that if one makes a function then exports it, if the function contains more then one command, only the last one...
by Rene_is_I
Sun Apr 07, 2013 2:33 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 4022

Re: Another possible method to access GPIO

@rurwin You don't need aliases in any case. If you put the scripts somewhere that is on your $PATH and take the unnecessary ".sh" off their names, you can use them just the same as you are doing with your aliases. I disagree as I just tested it and it did not work. I made sure that I put it it in a ...

Go to advanced search