Go to advanced search

by seanspotatobusiness
Wed Sep 11, 2019 5:10 pm
Forum: Beginners
Topic: Was it always possible to control addressable LEDs with a Pi?
Replies: 5
Views: 171

Was it always possible to control addressable LEDs with a Pi?

This is a somewhat stupid question but did it used to be impossible to control addressable LEDs with a Pi? I was under the impression that a microcontroller had to be used in order to give a reliably timed signal but now I've seen a bunch of tutorials that say it is possible to do this with a Pi. I'...
by seanspotatobusiness
Fri Jul 26, 2019 12:13 pm
Forum: Beginners
Topic: MCP23017-based GPIO expander compatible with R Pi?
Replies: 3
Views: 138

MCP23017-based GPIO expander compatible with R Pi?

Can this kind of GPIO expander be used with the Raspberry Pi? https://www.aliexpress.com/item/32945601544.html?spm=a2g0s.9042311.0.0.27424c4dsJudEA The listing only mentions the Arduino but I thought it might work with the Raspberry Pi as well. Also, would using that kind of expander be a way of pro...
by seanspotatobusiness
Thu May 23, 2019 10:19 am
Forum: Python
Topic: RGB rainbow transition by PWM not working for me
Replies: 4
Views: 516

Re: RGB rainbow transition by PWM not working for me

Thanks very much! I thought colorsys provided the color wheel functionality? In any case, changing BCM to BOARD fixed the script.
by seanspotatobusiness
Wed May 22, 2019 11:48 am
Forum: Python
Topic: RGB rainbow transition by PWM not working for me
Replies: 4
Views: 516

RGB rainbow transition by PWM not working for me

I'm trying to use the code kindly provided by another forum user here: https://www.raspberrypi.org/forums/viewtopic.php?t=126405 The code is for driving RGB LEDs through the rainbow via PWM. The problem is that the code doesn't seem to work for me. I get the output printing to the terminal window bu...
by seanspotatobusiness
Wed May 22, 2019 12:31 am
Forum: Python
Topic: Command line program that doesn't end when pressing Ctrl + C
Replies: 7
Views: 533

Re: Command line program that doesn't end when pressing Ctrl + C

dl324 wrote:
Wed May 22, 2019 12:16 am
Works for me:

Code: Select all

35 work> while (1)
while? echo -n .
while? sleep 1
while? end
....^C
39 work> 
Thanks for responding. What is the code you posted? Is that some output you get on the CLI?
by seanspotatobusiness
Wed May 22, 2019 12:01 am
Forum: Python
Topic: Command line program that doesn't end when pressing Ctrl + C
Replies: 7
Views: 533

Command line program that doesn't end when pressing Ctrl + C

I copied this program (from here: https://grantwinney.com/how-to-use-an-rgb-multicolor-led-with-pulse-width-modulation-pwm-on-the-raspberry-pi/) to make random RGB colour transitions with an RGB LED. The code seems to include an attempt to tell the user how to terminate the program (by pressing Ctrl...
by seanspotatobusiness
Mon May 20, 2019 10:25 pm
Forum: Beginners
Topic: Trying to test LCD character displays using pogo pins - characters are garbled
Replies: 10
Views: 573

Re: Trying to test LCD character displays using pogo pins - characters are garbled

Indeed it was the timings; adding "compat_mode=True" to the initialisation parameters fixes the problem (by using slower/longer timings). Thus the code is now: import RPi.GPIO as GPIO from RPLCD.gpio import CharLCD import time while True: lcd = CharLCD(pin_rs=36, pin_e=38, pins_data=[31, 33, 35, 37]...
by seanspotatobusiness
Mon May 20, 2019 9:28 pm
Forum: Beginners
Topic: Trying to test LCD character displays using pogo pins - characters are garbled
Replies: 10
Views: 573

Re: Trying to test LCD character displays using pogo pins - characters are garbled

Changing the sleep time in my script to five seconds did not fix the problem so I suppose it is to do with the underlying timing of the signals.
by seanspotatobusiness
Sun May 19, 2019 5:29 pm
Forum: Beginners
Topic: Trying to test LCD character displays using pogo pins - characters are garbled
Replies: 10
Views: 573

Re: Trying to test LCD character displays using pogo pins - characters are garbled

In addition to @pcmanbob comments it may be worth checking the (fixed) timings for E-strobe lengths, delays etc. within the code. In my experience with quite a few display samples some codes use nominal values (eg. 50uS) which may need to be tweaked depending upon an individual display module the s...
by seanspotatobusiness
Sun May 19, 2019 1:16 pm
Forum: Beginners
Topic: Trying to test LCD character displays using pogo pins - characters are garbled
Replies: 10
Views: 573

Re: Trying to test LCD character displays using pogo pins - characters are garbled

Oh yeah, sorry I missed that in my excitement to try your first suggestion! Thanks again.
by seanspotatobusiness
Sun May 19, 2019 11:04 am
Forum: Beginners
Topic: Trying to test LCD character displays using pogo pins - characters are garbled
Replies: 10
Views: 573

Re: Trying to test LCD character displays using pogo pins - characters are garbled

You're right; thanks. I thought that part was just to configure the RPLCD code to send the correct signals - I didn't realise it was communicating to the LCD at that point. It works as well as I need it to now, to check that my LCD screens are functioning but there is still one perculiarity. In the ...
by seanspotatobusiness
Sun May 19, 2019 2:33 am
Forum: Beginners
Topic: Trying to test LCD character displays using pogo pins - characters are garbled
Replies: 10
Views: 573

Trying to test LCD character displays using pogo pins - characters are garbled

I wanted to test about 20 LCD character displays to make sure they're working as expected but there is a perculiarity which has thwarted me. I'm using pogo pins so I don't have to solder anything to the LCD PCBs. The problem is that if I start sending stuff to display on the LCD and then connect the...
by seanspotatobusiness
Sat May 18, 2019 12:38 am
Forum: General discussion
Topic: Accuracy of Raspberry Pi "clock"
Replies: 39
Views: 14051

Re: Accuracy of Raspberry Pi "clock"

If the Pi gains or loses a fixed amount of time each day, couldn't a daily adjustment be programmed in? Or does the amount of time lost/gained vary?
by seanspotatobusiness
Sat May 18, 2019 12:06 am
Forum: General discussion
Topic: Danger of high voltage from HDMI cable
Replies: 11
Views: 819

Re: Danger of high voltage from HDMI cable

Okay, it turned out that the live and neutral were switched on the extension cable I was using. Correcting this fixed the problem but I have another. The USB charger I'm using gives a negative which is 100 VAC relative to earth. When the live and neutral were the wrong way around this value was abou...
by seanspotatobusiness
Thu May 16, 2019 2:48 am
Forum: General discussion
Topic: Danger of high voltage from HDMI cable
Replies: 11
Views: 819

Danger of high voltage from HDMI cable

I don't know how common this is but I recently noticed a tingle when I touched the ground of my Raspberry Pi while connected to earth for ESD protection. I ultimately determined that the HDMI connector was at 240 VAC and apparently this is normal, considered safe and is referred to as "leakage". If ...
by seanspotatobusiness
Sat May 11, 2019 12:47 pm
Forum: Beginners
Topic: Boot with number lock on
Replies: 19
Views: 20015

Re: Boot with number lock on

Wow, that's a lot of steps just to get the numlock key on at start-up. Why isn't it the other way around? What percentage of people use the numpad for cursor direction when there are dedicated keys to the left of them?
by seanspotatobusiness
Thu May 09, 2019 1:57 am
Forum: Python
Topic: Bittrex API and Python
Replies: 2
Views: 323

Re: Bittrex API and Python

Thanks very much. I used "API_V2_0" because that was the example given but if I change it to "v1.1" then I get a different error, suggesting that this was the problem. What does it think I'm trying to give an attribute to? I'm trying to store the response of an API request (so I can compare it with ...
by seanspotatobusiness
Tue May 07, 2019 8:19 am
Forum: Python
Topic: Bittrex API and Python
Replies: 2
Views: 323

Bittrex API and Python

I'm trying to use the Bittrex API with the Python code available here: https://github.com/ericsomdahl/python-bittrex to get my order history so I can send myself a notification whenever an order is filled. I get the following error from the following code. Can anyone advise what's wrong? Thanks. Pyt...
by seanspotatobusiness
Wed Apr 24, 2019 12:38 am
Forum: Python
Topic: Restricted to Thonny version 2?
Replies: 5
Views: 265

Re: Restricted to Thonny version 2?

There's a newer version of Thonny available (3.something) but Add / Remove Software lists only 2.1.16 - is this because the latest version is not compatible with Raspbian Stretch or some other reason? Are you sure you are running Stretch? Thonny 3.1.0 is installed by default and is the only version...
by seanspotatobusiness
Tue Apr 23, 2019 9:48 pm
Forum: Python
Topic: Restricted to Thonny version 2?
Replies: 5
Views: 265

Restricted to Thonny version 2?

There's a newer version of Thonny available (3.something) but Add / Remove Software lists only 2.1.16 - is this because the latest version is not compatible with Raspbian Stretch or some other reason?
by seanspotatobusiness
Tue Apr 23, 2019 9:46 pm
Forum: Python
Topic: Sending individual lines to an LCD display, bumping up the previous lines
Replies: 11
Views: 491

Re: Sending individual lines to an LCD display, bumping up the previous lines

Thanks very much. I think this is all I need now! Edit: it's working. In case anyone wants the final code, the sender is as follows: import os import time fifoName = "/tmp/test.fifo" try : os.mkfifo(fifoName) except OSError : pass for n in range(1,6): with open(fifoName,"w") as f: f.write("TO Sean__...
by seanspotatobusiness
Mon Apr 22, 2019 8:11 pm
Forum: Python
Topic: Sending individual lines to an LCD display, bumping up the previous lines
Replies: 11
Views: 491

Re: Sending individual lines to an LCD display, bumping up the previous lines

Thanks again; I think it's working after separating it into two programs. Is there some way to limit the FIFO to two lines so that the oldest gets deleted when another is added? I'm trying to get the reader file to send output to the LCD screen but it's not accepting my first attempt. I know my firs...
by seanspotatobusiness
Mon Apr 22, 2019 2:38 pm
Forum: Python
Topic: Sending individual lines to an LCD display, bumping up the previous lines
Replies: 11
Views: 491

Re: Sending individual lines to an LCD display, bumping up the previous lines

Thanks very much. You said it's important to close the FIFO but it looks like your code doesn't do that? Do I need "close.fifoName()" at the end of the write and read sections? import os import sys fifoName = "/tmp/16x2_LCD.fifo" try : os.mkfifo(fifoName) except OSError : pass for n in range(1,6): w...
by seanspotatobusiness
Mon Apr 22, 2019 3:20 am
Forum: Python
Topic: Sending individual lines to an LCD display, bumping up the previous lines
Replies: 11
Views: 491

Re: Sending individual lines to an LCD display, bumping up the previous lines

Thanks very much. I'm attempting to use this example: http://timmurphy.org/2013/11/11/using-fifos-in-python/ My test python file has path = "/tmp/16x2_LCD.fifo" os.mkfifo(path) The problem I encounter is that when the python file is run again I get the error: $ python /home/pi/Mining/LCDUpdater.py T...

Go to advanced search