Go to advanced search

by LONGJA
Thu Nov 21, 2019 9:58 am
Forum: General discussion
Topic: Latest updates 20/11/19 affecting fstab
Replies: 1
Views: 173

Latest updates 20/11/19 affecting fstab

Morning, I have a batch script that I use to install a series of libraries on my pi. One of these scripts runs the following commands to permanently mount a usb drive at boot... sudo mkdir /mnt/usbstorage sudo chown -R pi:pi /mnt/usbstorage sudo chmod -R 775 /mnt/usbstorage sudo apt-get update sudo ...
by LONGJA
Fri Nov 08, 2019 9:49 am
Forum: General discussion
Topic: Persistent SD Card Corruption
Replies: 16
Views: 1243

Re: Persistent SD Card Corruption

Thanks for your responses, I've upgraded and now have access to the read-only functionality. Now to start testing...
by LONGJA
Wed Nov 06, 2019 5:33 pm
Forum: General discussion
Topic: Persistent SD Card Corruption
Replies: 16
Views: 1243

Re: Persistent SD Card Corruption

rpdom - apologies if I'm being thick. Have had a look through raspi-config and I can't find anything that looks like 'read-only-root'.

Please could you point me in a right direction?

I'm using a 3B+, will this have any effect?
by LONGJA
Wed Nov 06, 2019 9:10 am
Forum: General discussion
Topic: Persistent SD Card Corruption
Replies: 16
Views: 1243

Re: Persistent SD Card Corruption

rpdom - that's great that there's now an option in Raspbain. Do you have any idea (or could you point me to) how this deals with the boot and other partitions?
by LONGJA
Tue Nov 05, 2019 4:58 pm
Forum: General discussion
Topic: Persistent SD Card Corruption
Replies: 16
Views: 1243

Re: Persistent SD Card Corruption

Unfortunately, I can't use a hat as we've built our own and therefore no longer have access to the GPIO header. I've really looking for a RAM solution - @jamesh - the read only solution we're using at the moment claims to deliver a 'read only root partition'. I assume this therefore does not cover s...
by LONGJA
Tue Nov 05, 2019 3:41 pm
Forum: General discussion
Topic: Persistent SD Card Corruption
Replies: 16
Views: 1243

Re: Persistent SD Card Corruption

Sorry! Been using it in a batch script. I meant this website...

http://wiki.psuter.ch/doku.php?id=solve ... _partition
by LONGJA
Tue Nov 05, 2019 11:49 am
Forum: General discussion
Topic: Persistent SD Card Corruption
Replies: 16
Views: 1243

Persistent SD Card Corruption

Hi there, The problem that we are facing is SD card corruption, specifically with the Raspbian operating system. We are using the Raspberry Pis (3B+) in environments where they may lose power at any moment. We need to use them headless and have no formal process to switch them off, we just pull the ...
by LONGJA
Thu May 23, 2019 7:06 pm
Forum: C/C++
Topic: Saving file to USB
Replies: 7
Views: 1182

Re: Saving file to USB

Thanks Andyroo, will start there
by LONGJA
Thu May 23, 2019 6:36 pm
Forum: C/C++
Topic: Saving file to USB
Replies: 7
Views: 1182

Saving file to USB

Hi all, I'm want to save a file to an external USB drive and would like to know the best way to do it. At the moment the file is created and saved in the folder that I'm working in but I can't get it to land anywhere outside of that folder. The file is called settings.cfg so I have tried things alon...
by LONGJA
Fri Apr 12, 2019 4:14 pm
Forum: Automation, sensing and robotics
Topic: CT Sensor not working on home AC Feed
Replies: 5
Views: 411

Re: CT Sensor not working on home AC Feed

I'm based in the northwest of the UK. I'll try and get hold of a clamp meter. I've just bought an 'Owl Energy Monitor' and tried that for comparison - the readings on this are much closer to what I'd expect. Still doesn't explain the weird results I'm getting.
by LONGJA
Fri Apr 12, 2019 8:34 am
Forum: Automation, sensing and robotics
Topic: CT Sensor not working on home AC Feed
Replies: 5
Views: 411

Re: CT Sensor not working on home AC Feed

Nope, I put the clamp the other way around and it hasn't made a difference :(
by LONGJA
Thu Apr 11, 2019 3:26 pm
Forum: Automation, sensing and robotics
Topic: CT Sensor not working on home AC Feed
Replies: 5
Views: 411

CT Sensor not working on home AC Feed

Hi all, I've been working on getting a CT sensor to work for a couple of weeks now. I've been doing my testing with a standard 13A kettle lead and have separated the live, neutral and earth - putting the clamp around the live wire. This has worked fine and I've got some accurate, calibrated readings...
by LONGJA
Tue Apr 02, 2019 4:04 pm
Forum: C/C++
Topic: CT Clamp with Raspberry Pi (AC Current Sensor)
Replies: 5
Views: 5340

Re: CT Clamp with Raspberry Pi (AC Current Sensor)

Thanks for you help everyone - I think I'm sorted now. I was doing the bits to volts conversion twice which wasn't helping. For anyone else trying to do this is in the future. I also found that code supplied with the board works well from about 200W upwards but not for less than 200W, I changed the ...
by LONGJA
Mon Apr 01, 2019 11:42 am
Forum: C/C++
Topic: CT Clamp with Raspberry Pi (AC Current Sensor)
Replies: 5
Views: 5340

CT Clamp with Raspberry Pi (AC Current Sensor)

Hi there, I trying to use my raspberry pi to measure the output from an AC current clamp. I have an ADC on my Pi to manage the analogue output from the following board... https://thepihut.com/products/gravity-analog-ac-current-sensor I'm supplying 5V to the DFRobot board and reading the output volta...
by LONGJA
Mon Feb 04, 2019 11:01 pm
Forum: C/C++
Topic: Hardware Watchdog Issue with GPIO
Replies: 1
Views: 869

Hardware Watchdog Issue with GPIO

Hi there, I've fixed a hardware watchdog (switchdoc labs dual watchdog timer) to my Pi (3b+) and are having some issues. The watchdog is used to power a relay to power cycle the pi. I have a program that sends a heart beat to pat the watchdog from pin37. Once the program is up and running the watchd...
by LONGJA
Mon Jul 30, 2018 1:44 pm
Forum: C/C++
Topic: Program Reboot After Crash
Replies: 1
Views: 436

Program Reboot After Crash

Hi All, I'm running a c program on a loop and I currently have it booting at startup from .bashrc. I want the program to run forever but the program has crashed on occasions. I know I need a watchdog feature but I'm unsure of how to do it on a RPi 3B+ in C. I found this tutorial... https://bloggerbr...
by LONGJA
Tue Jun 12, 2018 10:27 am
Forum: C/C++
Topic: Using Hex value in a Calculation
Replies: 3
Views: 666

Using Hex value in a Calculation

Hi there, I'm trying to build a program that calculates the difference, in seconds, between two times. I want to read the time from an I2C realtime clock and convert the time into a total in seconds. For example, for 11:18:58, I want to be able to do (11x3600) + (18x60) + (58) = 40738. However the r...
by LONGJA
Mon Apr 09, 2018 8:45 am
Forum: C/C++
Topic: Running multiple functions at the same time
Replies: 5
Views: 1519

Re: Running multiple functions at the same time

PeterO - I assume the 'do' function here will run both simultaneously? Both programs, LCD and GSM query an AtD at some point, will this be a problem if the two try to query the AtD at the same time?
by LONGJA
Sun Apr 08, 2018 10:49 am
Forum: C/C++
Topic: Running multiple functions at the same time
Replies: 5
Views: 1519

Running multiple functions at the same time

Hello, I'm building a data logging system (in C) that sends data from a series of sensors via GSM but also has a 16x2 LCD screen. The data logging program loops every minute and but I would like the LCD program to loop much faster so it can respond quickly to changes. For example, if an extra device...
by LONGJA
Thu Mar 29, 2018 9:41 pm
Forum: C/C++
Topic: Trouble printing integer on I2C LCD in C
Replies: 6
Views: 983

Re: Trouble printing integer on I2C LCD in C

Worked perfectly - many thanks!
by LONGJA
Thu Mar 29, 2018 3:46 pm
Forum: C/C++
Topic: Trouble printing integer on I2C LCD in C
Replies: 6
Views: 983

Re: Trouble printing integer on I2C LCD in C

Many thanks for all your responses. I'll have a go and let you know have it goes.
by LONGJA
Wed Mar 28, 2018 4:21 pm
Forum: C/C++
Topic: Trouble printing integer on I2C LCD in C
Replies: 6
Views: 983

Trouble printing integer on I2C LCD in C

Hello, I'm relatively new to RPi and have used a tutorial on Sunfounder to connect an LCD to a RPi3 via I2C. The program runs fine but I'm struggling to print the output from a sensor (via MCP3008 AtD). I've tried a number of configurations but the program will always print "%d" on the LCD instead o...

Go to advanced search