Go to advanced search

by przemof
Wed Mar 20, 2019 9:53 pm
Forum: Python
Topic: Temperature
Replies: 8
Views: 377

Re: Temperature

Split it into smaller tasks. Give us more details: "arm a system" means pretty much anything from setting I/O to 1 to sending an email to dedicated account. Your task list as I see it: 1. Make algorithm and code to measure temperature. Allow for check to trigger some actions at set temperature. 2. M...
by przemof
Wed Jan 30, 2019 2:02 pm
Forum: Beginners
Topic: Problem installing Liblo (./configure)
Replies: 7
Views: 378

Re: Problem installing Liblo (./configure)

I think your last question is no longer relevant in this thread. Start another thread?
by przemof
Tue Jan 29, 2019 7:52 am
Forum: Beginners
Topic: Problem installing Liblo (./configure)
Replies: 7
Views: 378

Re: Problem installing Liblo (./configure)

Having problems is part of learning, so you're OK. Check if you have liblo built/installed for python2 or python3

That might help you: https://stackoverflow.com/questions/739 ... on-modules
by przemof
Mon Jan 28, 2019 10:52 am
Forum: Beginners
Topic: Problem installing Liblo (./configure)
Replies: 7
Views: 378

Re: Problem installing Liblo (./configure)

Did you install liblo after building it?
make install is the normal way (again autotools)
by przemof
Sat Jan 26, 2019 10:37 pm
Forum: Off topic discussion
Topic: Touch not working correct
Replies: 1
Views: 530

Re: Touch not working correct

What touch screen?

P.S. Why off-topic?
by przemof
Sat Jan 26, 2019 10:33 pm
Forum: Beginners
Topic: Problem installing Liblo (./configure)
Replies: 7
Views: 378

Re: Problem installing Liblo (./configure)

Run autogen.sh - it will create configure. Also read something about autotools - that'll help you in the future.
by przemof
Fri Jan 11, 2019 9:57 am
Forum: Official Foundation Display
Topic: Waterproof Touch Screen
Replies: 9
Views: 10799

Re: Waterproof Touch Screen

I'll be switching main user input to rotary encoder push button. We should start a new thread in a different part of he forum.
by przemof
Thu Jan 10, 2019 2:27 pm
Forum: Beginners
Topic: Fresh installation of raspbian lite stuck on "Starting regenerate SSH host keys..."
Replies: 3
Views: 245

Re: Fresh installation of raspbian lite stuck on "Starting regenerate SSH host keys..."

Good few minutes (3-5?). I gave up - probably my SD card port in laptop that I used to write the card went crazy. I tried full desktop raspbian - another error. Then I couldn't even read another card, but pi was booting from it. Now I'm using external adapter and will report back if it works or not.
by przemof
Thu Jan 10, 2019 1:06 pm
Forum: Beginners
Topic: Fresh installation of raspbian lite stuck on "Starting regenerate SSH host keys..."
Replies: 3
Views: 245

Fresh installation of raspbian lite stuck on "Starting regenerate SSH host keys..."

Hardware: pi zero w, fresh installation got stuck on:

Code: Select all

Starting regenerate SSH host keys...
Should I give it a few minutes or try to write the card again? Obviously I never checked SHA256 :mrgreen:

Edit: local file sha is OK, writing with dd went without errors. I'll try full desktop
by przemof
Mon Jan 07, 2019 6:33 pm
Forum: Python
Topic: Parallax SF11-C Laser Rangefinder
Replies: 5
Views: 441

Re: Parallax SF11-C Laser Rangefinder

USB-to-serial converters are cheap or you can use pi serial directly and vendor provides example c code: [1]

[1] https://www.parallax.com/downloads/sf10 ... de-example
by przemof
Thu Dec 20, 2018 9:49 pm
Forum: General discussion
Topic: How long will this battery last?
Replies: 13
Views: 679

Re: How long will this battery last?

Pi zero W + piTFT 2.8" got 8h 21m with no wifi. The wifi wasn't switched off, just disconnected.
by przemof
Thu Dec 13, 2018 1:22 pm
Forum: Python
Topic: Reading multiple DS18B20 with Python
Replies: 14
Views: 22843

Re: Reading multiple DS18B20 with Python

Another variation. #!/usr/bin/env python import glob import time # DS18B20.py # 2016-04-25 # Public Domain # Typical reading # 73 01 4b 46 7f ff 0d 10 41 : crc=41 YES # 73 01 4b 46 7f ff 0d 10 41 t=23187 while True: for sensor in glob.glob("/sys/bus/w1/devices/28-00*/w1_slave"): id = sensor.split("...
by przemof
Sun Dec 09, 2018 12:49 pm
Forum: General discussion
Topic: Help - Incorrect reading of magnetic encoder
Replies: 8
Views: 612

Re: Help - Incorrect reading of magnetic encoder

Thanks! Now I understand what you've done: there is rotary_encoder.py python file (the code OP posted), providing "decoder" class that is redefined in the __main__ section to "decoder" variable. Also in the rotary_encoder.py you use import rotary_encoder! That's why I thought there is some external ...
by przemof
Sun Dec 09, 2018 10:23 am
Forum: General discussion
Topic: Help - Incorrect reading of magnetic encoder
Replies: 8
Views: 612

Re: Help - Incorrect reading of magnetic encoder

:D Great! It's PEP8/F811 error. The code might work, I'm not saying it's a hard error.

What's under the import rotary_encoder? I can't find any code and it's not a standard library. And where you use that decoder class? There is some external rotary_encoder module?
by przemof
Sun Dec 09, 2018 10:13 am
Forum: General discussion
Topic: Help - Incorrect reading of magnetic encoder
Replies: 8
Views: 612

Re: Help - Incorrect reading of magnetic encoder

Also, can you try to read the output diirectly and check that the encoder works as expected? Just print out the gpios and turn the encoder slowly
by przemof
Sun Dec 09, 2018 10:06 am
Forum: General discussion
Topic: Help - Incorrect reading of magnetic encoder
Replies: 8
Views: 612

Re: Help - Incorrect reading of magnetic encoder

If you're sure the code is OK then the hardware is not OK - i can't help with that. You use the class decoder in some other part of the program? If you use that class in the code you posted, could you point me to that part? You have name redefinition from class to variable. No errors doesn't meant t...
by przemof
Sat Dec 08, 2018 8:40 pm
Forum: General discussion
Topic: Help - Incorrect reading of magnetic encoder
Replies: 8
Views: 612

Re: Help - Incorrect reading of magnetic encoder

I'd start with fixing the code: you have class decoder and variable decoder. On top of that you don't use that class? Try flake8, autopep8, pylint to check your code. You wrote the code?
by przemof
Sat Dec 08, 2018 6:30 pm
Forum: Official Foundation Display
Topic: Waterproof Touch Screen
Replies: 9
Views: 10799

Re: Waterproof Touch Screen

Anyone actually uses a touchscreen in wet/cold conditions? I'll need one for a bicycle computer.
by przemof
Fri Nov 30, 2018 10:20 am
Forum: General discussion
Topic: Laser projector for RPi bike light computer
Replies: 3
Views: 464

Re: Laser projector for RPi bike light computer

That's close, but that's a rear light [1]. Also you can buy led projector with custom logo, but I don't think it's bright enough for daylight.

[1] https://www.alibaba.com/product-detail/ ... 7815cLeHqF
by przemof
Wed Nov 28, 2018 9:43 am
Forum: Off topic discussion
Topic: BLE devices with no names
Replies: 5
Views: 2702

[SOLVED] Re: BLE devices with no names

I have code that scans for BLE devices and then tries to get services to determine if a device provides the service i need (heart rate or cycling speed/cadence). I do the initial scan in 4 seconds, but connecting to each device and checking services takes over 60 seconds (for 3 devices). I could try...
by przemof
Tue Nov 27, 2018 2:12 pm
Forum: General discussion
Topic: how to use crontab -e
Replies: 7
Views: 473

Re: how to use crontab -e

Yes. I.e.:

Code: Select all

date > /tmp/date_by_crontab
by przemof
Tue Nov 27, 2018 10:54 am
Forum: General discussion
Topic: how to use crontab -e
Replies: 7
Views: 473

Re: how to use crontab -e

@123jasonwa: can you explain what you're trying to do?
by przemof
Wed Nov 21, 2018 6:59 pm
Forum: Off topic discussion
Topic: BLE devices with no names
Replies: 5
Views: 2702

Re: BLE devices with no names

I want to "do the right thing" - I'm sure it will work with my sensors, but the underlying system should be useful for other embedded projects as well (IoT controller, weather stations, smart home heating etc), so I'm trying to make it "futureproof" without knowing what sensors will be connected. I'...
by przemof
Wed Nov 21, 2018 6:24 pm
Forum: Off topic discussion
Topic: BLE devices with no names
Replies: 5
Views: 2702

Re: BLE devices with no names

Thanks for the reply! I'm making a bicycle computer [1]. So asking each device for name and filtering out those not complying should be OK. I'm mostly interested with speed/cadence/heart rate sensors. Currently I just scan for devices and present user with the results without filtering. If device gi...

Go to advanced search