Go to advanced search

by DougieLawson
Mon Jan 21, 2019 8:56 pm
Forum: Beginners
Topic: What function would I use to do something every half second?
Replies: 6
Views: 66

Re: What function would I use to do something every half second?

I've done lots of useful (and accurate) timing in C++ with void wait3sec() { using std::chrono::system_clock; std::time_t tt = system_clock::to_time_t (system_clock::now()); struct std::tm *ptm = std::localtime(&tt); std::this_thread::sleep_for(std::chrono::seconds(3)); } Don't know what the limits ...
by DougieLawson
Mon Jan 21, 2019 8:45 pm
Forum: Automation, sensing and robotics
Topic: 2 LED wiring
Replies: 9
Views: 90

Re: 2 LED wiring

Try this: #!/usr/bin/python3 import time from gpiozero import LED led01 = LED(16) led02 = LED(20) while True: led01.on() print ("01") time.sleep(1) led01.off() led02.on() print ("02") time.sleep(1) led02.off() For Bob's wiring with a transistor try this: #!/usr/bin/python3 import time from gpiozero ...
by DougieLawson
Mon Jan 21, 2019 8:42 pm
Forum: Troubleshooting
Topic: Stuck at booting shows this error
Replies: 1
Views: 9

Re: Stuck at booting shows this error

Your SDCard is unreadable.

Get a factory fresh SDCard, write plain Raspbian 2018-11-13 to it using Etcher.
Boot that new system. Mount the unreadable SDCard in a USB reader. Mount the USB reader in your RPi and see if you can undo the damage.
by DougieLawson
Mon Jan 21, 2019 7:45 pm
Forum: General discussion
Topic: Features for future Pi, voltage/current reporting.
Replies: 14
Views: 224

Re: Features for future Pi, voltage/current reporting.

:lol: I was just trying to make a point so that people can see that it would be beneficial if it could be implemented for a low price. What possible use does it have? It's like reading the cpu temperature, what can you do if you don't like the numbers? If I know the power budget is limited I apply ...
by DougieLawson
Mon Jan 21, 2019 7:39 pm
Forum: Python
Topic: Learn Python 2 or 3 and how?
Replies: 6
Views: 85

Re: Learn Python 2 or 3 and how?

aamcle wrote:
Sun Jan 20, 2019 10:11 pm
1, Python 2.7 or Python 3?
For all new programs you should use python3 exclusively.

In eleven months, ten days, 4hours you won't get a choice.
https://pythonclock.org/
by DougieLawson
Mon Jan 21, 2019 7:36 pm
Forum: Beginners
Topic: What function would I use to do something every half second?
Replies: 6
Views: 66

Re: What function would I use to do something every half second?

birddseedd wrote:
Mon Jan 21, 2019 6:52 pm
Like a loop that would run every half second.
What programming language are you using?
by DougieLawson
Mon Jan 21, 2019 6:56 pm
Forum: General discussion
Topic: Cannot boot from USB without SD card
Replies: 6
Views: 178

Re: Cannot boot from USB without SD card

I would have thought the best experiment would be to load plain Raspbian 2018-11-13 onto a blank USB device and see what happens with that. Then look at the 4.19 kernel (which is being tested with sudo BRANCH=next rpi-update) then look at moving your application on to a supported/supportable version...
by DougieLawson
Mon Jan 21, 2019 6:53 pm
Forum: Beginners
Topic: Running bash script as a service?
Replies: 12
Views: 1658

Re: Running bash script as a service?

You think everything is a bad idea. And don't often back up your arguments. You were spitting feathers about minicom the last time our paths crossed. Finally, I can think of 3 obvious reasons why using cron as you describe is a bad idea. They are so obvious that I won't bother writing them out now....
by DougieLawson
Mon Jan 21, 2019 6:46 pm
Forum: Beginners
Topic: navigation system
Replies: 6
Views: 180

Re: navigation system

sky12 wrote:
Mon Jan 21, 2019 2:06 pm
Hi everyone, we are working on something like autopilot wheelchair. Do you mind if ask some source codes in python for autopilot system?
How much are you willing to pay (hourly or daily rate) for a commercial software development project? Expect to spend at least $100/hr ($750/day) or more.
by DougieLawson
Mon Jan 21, 2019 3:53 pm
Forum: Troubleshooting
Topic: Unable to login to wifi (wlan0: Not associated)
Replies: 19
Views: 280

Re: Unable to login to wifi (wlan0: Not associated)

There is no value in running anti-virus junk. Most of the stuff out there is to protect filesystem shares from Windows virii. If you follow sane and secure security practices (ie don't put a Pi on the public internet with user=pi and password=raspberry) you are unlikely to be a target for the bad ac...
by DougieLawson
Mon Jan 21, 2019 3:49 pm
Forum: Advanced users
Topic: Moving Linux kernel to 4.19
Replies: 76
Views: 12689

Re: Moving Linux kernel to 4.19

1. Do you recommend to install kernel 4.19 now? Is It stable? 2. Can I back to kernel 4.14 simply running a rpi-update without BRANCH=next? 1. No, it's not stable enough. I'm still running eight of my eighteen Raspberries on 4.14. 2. If you have to ask that you shouldn't be running rpi-update, you ...
by DougieLawson
Sun Jan 20, 2019 11:41 am
Forum: Other
Topic: How to skip initial network setup(ubuntu core)?
Replies: 5
Views: 100

Re: How to skip initial network setup(ubuntu core)?

Why not switch to Raspbian which behaves in the way you want and allows lots of control over networking.
by DougieLawson
Sat Jan 19, 2019 9:15 pm
Forum: Compute Module
Topic: Using Raspberry Pi MAC addresses for commercial products based on Compute Module?
Replies: 7
Views: 168

Re: Using Raspberry Pi MAC addresses for commercial products based on Compute Module?

The mac address is not secure. You can easily spoof it. There's also only 24-bits of uniqueness. First 24-bits are fixed. We've seen address wrap-around as there are already more than 16million pis out there in the wild and with a random assignment wrap-around occurred before the 16million were sold...
by DougieLawson
Sat Jan 19, 2019 5:19 pm
Forum: Troubleshooting
Topic: Unable to login to wifi (wlan0: Not associated)
Replies: 19
Views: 280

Re: Unable to login to wifi (wlan0: Not associated)

Yes. The taskbar widget works with WPA or WPA2.

You will also gain a level of security that is two orders of magnitude better than WEP.

It will be painful as every device has to re-signin to your network.
by DougieLawson
Sat Jan 19, 2019 4:31 pm
Forum: Troubleshooting
Topic: Unable to login to wifi (wlan0: Not associated)
Replies: 19
Views: 280

Re: Unable to login to wifi (wlan0: Not associated)

Stop using WEP. It is no more secure than a network with no security at all.
by DougieLawson
Sat Jan 19, 2019 2:01 pm
Forum: Troubleshooting
Topic: Unable to login to wifi (wlan0: Not associated)
Replies: 19
Views: 280

Re: Unable to login to wifi (wlan0: Not associated)

You need to enclose SSID & password in quotes (inverted commas is a quaint old English term, not used in computing).

It's quotes " or apostrophes ' or back-ticks ` in computing.
Just like it's braces {}, brackets [] and parentheses () [aka left banana, right banana].
by DougieLawson
Sat Jan 19, 2019 1:33 pm
Forum: Troubleshooting
Topic: Unable to login to wifi (wlan0: Not associated)
Replies: 19
Views: 280

Re: Unable to login to wifi (wlan0: Not associated)

You need

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB

network={
        ssid="wifiSSID_goes_here"
        psk="password_goes_here"
}
Nothing more, nothing less. Change "country=GB" to your local value.
by DougieLawson
Sat Jan 19, 2019 10:53 am
Forum: Troubleshooting
Topic: Unable to login to wifi (wlan0: Not associated)
Replies: 19
Views: 280

Re: Unable to login to wifi (wlan0: Not associated)

Is the access point using WPA or WPA2 security?
by DougieLawson
Sat Jan 19, 2019 9:16 am
Forum: Advanced users
Topic: config.txt file kernel reading procedure
Replies: 9
Views: 771

Re: config.txt file kernel reading procedure

1 No.
2 No.
3 No.

Go and start a new thread in https://www.raspberrypi.org/forums/viewforum.php?f=72 where folks are more likely to be able to tell you how to do that stuff.
by DougieLawson
Sat Jan 19, 2019 8:04 am
Forum: Networking and servers
Topic: Openvpn does not start
Replies: 3
Views: 90

Re: Openvpn does not start

If the config file is /etc/openvpn/qwerty.conf then get it active at boot time with

sudo systemctl enable [email protected]

Get it started now with

sudo systemctl start [email protected]
by DougieLawson
Fri Jan 18, 2019 10:29 pm
Forum: Troubleshooting
Topic: Script doesn't run in crontab, but runs in command line
Replies: 7
Views: 87

Re: Script doesn't run in crontab, but runs in command line

If your program needs the GUI start it from the autostart file.

/home/pi/.config/lxsession/LXDE-pi/autostart (or wherever it is on your system)
by DougieLawson
Fri Jan 18, 2019 10:27 pm
Forum: HATs and other add-ons
Topic: Geekworm Power Pack Pro V1.1 problem
Replies: 5
Views: 97

Re: Geekworm Power Pack Pro V1.1 problem

Try booting with Raspbian 2018-11-13 (which has support for 3B+ & 3A+ boards).

Go to advanced search