Go to advanced search

by Ageir
Sat Nov 18, 2017 6:37 pm
Forum: Python
Topic: Code for LED matrix with shift registers.
Replies: 8
Views: 2039

Re: Code for LED matrix with shift registers.

That's working just fine. But it's all inversed on my display. How do i rotate the bitmap in python? This is the number two how it should look like. '2':(0b00000000, 0b00111100, 0b01100110, 0b00000110, 0b00001100, 0b00110000, 0b01100000, 0b01111110) And this is what my display is showing. It's backw...
by Ageir
Sat Nov 18, 2017 4:04 pm
Forum: Python
Topic: Code for LED matrix with shift registers.
Replies: 8
Views: 2039

Re: Code for LED matrix with shift registers.

Looking into it I'm guessing a dictionary containing tuples would be a good choice. num= {'1': (0b00000000, 0b00011000, 0b00011000, 0b00111000, 0b00011000, 0b00011000, 0b00011000, 0b01111110), '2':(0b00000000, 0b00111100, 0b01100110, 0b00000110, 0b00001100, 0b00110000, 0b01100000, 0b01111110) } Some...
by Ageir
Sat Nov 18, 2017 3:14 pm
Forum: Python
Topic: Code for LED matrix with shift registers.
Replies: 8
Views: 2039

Re: Code for LED matrix with shift registers.

Thanks BitHead. Will try it. What's the best way to convert/store this in python? Array? Tuple? List? Matrix? const byte IMAGES[][8] = { { B00000000, B00011000, B00011000, B00111000, B00011000, B00011000, B00011000, B01111110 },{ B00000000, B00111100, B01100110, B00000110, B00001100, B00110000, B011...
by Ageir
Fri Nov 17, 2017 12:52 pm
Forum: Python
Topic: Code for LED matrix with shift registers.
Replies: 8
Views: 2039

Re: Code for LED matrix with shift registers.

Basically anything really. Just using two bytes, 0x00, 0xff etc is a pain to draw any shape.
by Ageir
Thu Nov 16, 2017 12:55 pm
Forum: Python
Topic: Code for LED matrix with shift registers.
Replies: 8
Views: 2039

Code for LED matrix with shift registers.

I'm trying to run a 8x8 led matrix via 2x 74hc595 shift registers. I got it working with this code. https://www.sunfounder.com/learn/Super_Kit_V2_for_RaspberryPi/lesson-12-driving-dot-matrix-by-74hc595-super-kit-for-raspberrypi.html But trying to write text or graphics with that code is rather diffi...
by Ageir
Sun Jun 04, 2017 1:26 pm
Forum: Automation, sensing and robotics
Topic: Relays and failsafe
Replies: 27
Views: 4134

Re: Relays and failsafe

Search "retriggerable monostable". See LS74HC123 I'll probably try this approach as well as the 555 version suggested. It has two types, which one is more suitable with the RPi? Are the GPIOS TTL or CMOS? Or does it matter at all? I'm guessing the HCT type since it register 2V+ as high and can be c...
by Ageir
Sun Jun 04, 2017 1:14 pm
Forum: Automation, sensing and robotics
Topic: Relays and failsafe
Replies: 27
Views: 4134

Re: Relays and failsafe

So 3 input options are :- constant low > output constant high constant high > output triggers low on rising edge but times out and returns to high 0.5 sec high followed by 0.5 sec low repeating > output triggers low and stays low Thanks, will try it. Just need to buy the components. I use tiny cad ...
by Ageir
Sun Jun 04, 2017 11:19 am
Forum: Automation, sensing and robotics
Topic: Relays and failsafe
Replies: 27
Views: 4134

Re: Relays and failsafe

OK did some more testing using the existing circuit with a diode for retriggering , if you pulse the input at 0.5 sec intervals with an 0.5 sec on pulse you can keep the output active low for as long as you like but if input stops triggering or goes constant high output will time out. Thanks! :D Ca...
by Ageir
Sun Jun 04, 2017 10:07 am
Forum: Python
Topic: RPi CPU temp with Python
Replies: 15
Views: 18531

Re: RPi CPU temp with Python

Measuring CPU temperature isn't useful for measuring the ambient temperature. You'll need to use a BMP085, BMP180, BME280, DHT11 or DS18B20 sensor or a MAX31855 SPI thermocouple amplifier (with a k-type thermocouple).
No that's why I mentioned I have an external sensor. DHT22 actually.
by Ageir
Sun Jun 04, 2017 9:54 am
Forum: Automation, sensing and robotics
Topic: Relays and failsafe
Replies: 27
Views: 4134

Re: Relays and failsafe

Search "retriggerable monostable". See LS74HC123
I got 0 hits searching for LS74HC123, you must have misspelled it.
by Ageir
Sun Jun 04, 2017 9:49 am
Forum: Automation, sensing and robotics
Topic: Relays and failsafe
Replies: 27
Views: 4134

Re: Relays and failsafe

But if you have re-trigger before time out and your Pi fails with a high on the GPIO output the timer will be re-trigged constantly so defeating the object of the fail safe circuit. The time out function is what is providing the fail safe function. Ah! I thought it was triggered by raising of falli...
by Ageir
Sun Jun 04, 2017 9:04 am
Forum: Python
Topic: RPi CPU temp with Python
Replies: 15
Views: 18531

Re: RPi CPU temp with Python

Thanks for the code! :) What do you think it will tell you? Running any program will make the CPU run hotter. What do you think you can do if it runs hot? I intend to place it in a greenhouse as a controller and would like to measure the temperature so it won't get too hot. I'm placing an external s...
by Ageir
Sun Jun 04, 2017 8:58 am
Forum: Automation, sensing and robotics
Topic: Relays and failsafe
Replies: 27
Views: 4134

Re: Relays and failsafe

Ah, thanks! :)
555 cant be re-triggered until timed out.
I didn't realize that. Was relying on that you could. Then it won't work as I like.
Any other circuit that lets you re-trigger before time out?
by Ageir
Sat Jun 03, 2017 5:44 pm
Forum: Python
Topic: RPi CPU temp with Python
Replies: 15
Views: 18531

RPi CPU temp with Python

Hi!

I'm trying to read the RPi CPU temperature with Python. I tried psutil but it won't work.
Must be another easy way to get the temperature. And are there any other temp you can read on the RPi except CPU? Wifi chip?
by Ageir
Sat Jun 03, 2017 5:29 pm
Forum: Automation, sensing and robotics
Topic: Relays and failsafe
Replies: 27
Views: 4134

Re: Relays and failsafe

I read the spec sheets for those watchdog circuits and realize that they won't work. They output a square wave with a length that's the same as the timeout. They are for triggering a reset only. I'll try making a monostable circuit with a 555 timer. Like this: http://www.ohmslawcalculator.com/555-mo...
by Ageir
Thu Jun 01, 2017 6:36 pm
Forum: Automation, sensing and robotics
Topic: Relays and failsafe
Replies: 27
Views: 4134

Re: Relays and failsafe

Thanks for the tip on watchdog timers. Didn't know the name for it. :D I'll try to solve it without an external uP and just use the RPi for now. Since it's not that time critical I'm sure the RPi wil be fine. Setting up apscheduler in python will probably work. Setting it to pulse the timer every 0....
by Ageir
Thu Jun 01, 2017 2:33 pm
Forum: Automation, sensing and robotics
Topic: Relays and failsafe
Replies: 27
Views: 4134

Relays and failsafe

Hi! I'm working on a greenhouse automation project. I got two water solenoid valves connected to a standard 2xRelay board with optocouplers to control them. I need some help on how to solve it electronically so that the Relays turns off automatically (failsafe) if the python program crashes or the R...

Go to advanced search