Quantcast
Viewing all 53895 articles
Browse latest View live

LTR559 maximum level hit

I’ve honestly no idea why you’d get UV ratings that high. DEFRA monitoring suggested it was nudging the mid 7s. I wondered if it might be a setting on the sensor but the datasheet is pretty crap, it mentions a dynamic range but only says that flipping a bit “allows for increasing the dynamic”, whatever that means.

I wouldn’t go dilberately trying to increase the amount of light that the sensor collects, that will screw with the calculations (it will have been calibrated to calculate the UV index given its normal light collecting properties, if you increase the light collected you’re going to increase the index values it calculates).


Garden Breakout with SPI + I2C for NeoTrellis

Yes yes. You understand me. Aww, bummer. Thank you for your respond.

Garden Breakout with SPI + I2C for NeoTrellis

It’s odd that they didn’t break out a SPI bus on it, it definitely has one. At any rate i2c is generally slower than SPI so it may not work for audio, depending on the quality.

Pi4 ReSpeaker 2-Mic HAT + Fan Shim

So, keeping the fan ON permanently wouldn’t be a smart thing to do. The usage on these devices are intermittent but when they are in use, they get really hot.

Minicorn (or Unicorn HAT mini)'s pinout question

No problem, stuff like that happens. I have one on the way, should have been here by now actually. Hopefully I can get my hands on it early next week.

Not detecting joystick or buttons-pi4/usb c picade hat board

Hi,

I brought a picade arcade kit of ebay but it didn’t come with a raspberry pi. So I brought a new pi4 and a new picade hat usb c board and built it. I have downloaded the latest retropie 4.6 and run that and have updated everything on there. I installed the picade hat driver and have checked the following:

  • Make sure /boot/overlays/picade.dtbo exists: Checked and it does
  • Make sure dtoverlay=picade is in /boot/config.txt: checked and it does
  • Check dmesg output for any glaring errors: Tried to but text goes by too fast. Is there a way to display one page at a time?
  • Check that /etc/udev/rules.d/10-picade.rules exists : Checked and it does

I then tried the following:

  • drop to terminal from ES by hitting F4 (you will need a keyboard!)
  • install wiringpi for the gpio utility: sudo apt install wiringpi
  • run watch -n 0.1 gpio readall to watch your GPIO status
  • hit some buttons, twiddle the joystick (slowly, 0.1 is a tenth of a second so any action <0.1s may not be visible) and see if anything changes

But it comes up with model of board not recognised or similar

I have tried reseating the picade hat board and it works because I have my usb power cable attached to the picade hat board. My adapter is 3A.

It comes up saying configure controls so I press Alt on my usb keyboard but then when I try and press the joystick up nothing happens. I feel I am close to getting it to work but does anyone have any other suggestions I can try?

Any help greatfully received

Steve

Pi4 ReSpeaker 2-Mic HAT + Fan Shim

Running the Fan continuously isn’t that big a deal. Mine is pretty well doing that now that summer is here. It will wear out that little bit quicker is all. You’ll have to unplug the power supply to make it stop when you do a shut down. That’s required software or no software anyway though.

LTR559 maximum level hit

I have an LTR559 and a VEML6075 UVA/B Sensor all hooked up and ready to go on my Breadboard rig. I’ll try and take it outside latter today and see what I get for readings. From the looks of our local weather forecast, today will be the last sunny day for a while. Five or six days of rain starting tomorrow.


LTR559 maximum level hit

The VEML6075 sensor is very directional and the PTFE tape is to reduce that, it will also probably reduce the level a bit. It is actually mentioned in the sensors __init__.py
https://github.com/pimoroni/veml6075-python/blob/master/library/veml6075/init.py

def convert_to_index(self, uva, uvb, uv_comp1, uv_comp2):
        result = 0
        # These values can be adjusted for calibration
        uva_calib = 1
        uvb_calib = 1
        uv_comp1_calib = 1
        uv_comp2_calib = 1
        '''Coefficients for open air sensor and thin Teflon diffuser up to 0.25mm
        For diffuser thickness of 0.4 mm and 0.7 mm other / lower IR coefficients need to be used. These are: uva_b_coef = 1.17 and uvb_d_coef = 1.58.
        The visible cancellation coefficients stay the same.'''
        uva_a_coef = 2.22
        uva_b_coef = 1.33
        uvb_c_coef = 2.95
        uvb_d_coef = 1.74
        uva_response = 0.001461
        uvb_response = 0.002591
        uva_calc = uva - ((uva_a_coef * uva_calib * uv_comp1) / uv_comp1_calib) - ((uva_b_coef * uva_calib * uv_comp2) / uv_comp2_calib)
        uvb_calc = uvb - ((uvb_c_coef * uvb_calib * uv_comp1) / uv_comp1_calib) - ((uvb_d_coef * uvb_calib * uv_comp2) / uv_comp2_calib)
        uva_index = uva_calc * (1 / uva_calib) * uva_response
        uvb_index = uvb_calc * (1 / uvb_calib) * uvb_response
        result = (uva_index + uvb_index) / 2

        return uva_index, uvb_index, result

LTR559 maximum level hit

For my location, Sydney Nova Scotia, Canada, Environment Canada reports the UV index as 8.
My Si1145 which approximates the UV index based on ambient and IR light is saying its 9
The VEML6075 gave me the following when placed in direct sunlight.
UVA: 12978, UVB: 13925, Comp 1: 2387, Comp 2: 971
UVA index: 9.33, UVB Index: 13.457, AVG: 11.3945

For LUX I got 37704 on the LTR559

It’s a bright sunny day with no clouds. 25c temperature

New Artwork for Picade Cabinet

Hi All. Just in the process of putting my first Pi together, and planning on ordering the latest 8 inch Picade when I’m done.
Would it be possible for you to send me the artwork for Bubble Bobble, and Streetfighter 2 (the original arcade artwork as below)? Many thanks and congratulations on some stunning work.

Not detecting joystick or buttons-pi4/usb c picade hat board

You can pipe the output from dmesg into the more command to display it one page at a time:

dmesg | more

Press [Space] to go to the next page, and [q] if you want to quit before you get to the end.

I’ve never used the gpio utility, so I don’t know why you’re getting that error - maybe it doesn’t work with the Pi4 and/or the USB-C XHAT.

You can check if the joystick and buttons are working from the terminal. The joystick should move the cursor, and some of the buttons should produce characters on the screen (not all buttons will because some are assigned to non-printing key strokes).

Trouble using the SH1106 OLED

Hi folks, finally getting on with my RasPi projects, with some success, but having some difficulty with the OLED when it comes to doing my own thing with it.

For reference, this is what Im trying to recreate https://www.raspberrypi-spy.co.uk/2019/10/pi-hole-oled-status-screen/ but with an SPI interface OLED instead.

Everything is working, the OLED is running on SPI0 as device 1, and I can run the bounce example perfectly fine - however, when I try to use the luma library I get nothing, zip, nada :(

heres what I do to run bounce
python3 bounce.py --display sh1106 --height 128 --rotate 2 --interface spi --spi-port 0 --spi-device 1 --gpio-data-command 9

heres the relevant snippet of my code, based on the example in the docu, the led blinks so I know the code and subsequent loop is running, but the screen stays blank. (Nothing changes about the wiring or settings in between running this, and bounce.)

#!/usr/bin/python3

Graphics libraries

from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
from luma.core.interface.serial import i2c,spi
from luma.core.render import canvas
from luma.oled.device import sh1106
serial = spi(device=0, port=1)
device = sh1106(serial, width=128, height=128, rotate=2, mode=1)

led.value=1

with canvas(device) as draw:
draw.rectangle(device.bounding_box, outline=“white”, fill=“black”)
draw.text((10, 40), “Hello World”, fill=“white”)
device.display # ??

led.value=0

with canvas(device) as draw:
draw.rectangle(device.bounding_box, outline=“white”, fill=“white”)
draw.text((10,40), “Hello World”, fill=“black”)
device.display # ??

It’s obviously something I’m missing or doing wrong but I’m not familiar with this library and it’s eluding me, any pointers please? TIA

Just bought my first rasp. Pi 4b

1.12" oled

Apologies for raising an old thread, however for the benefit of anyone else coming across this question, heres an answer. I believe the above code should now work - perhaps it was due to a bug (missing resolution settings) in the oled package at the time.

I use this successfully with the python 3.7 version of the package, and it does not generate any error

device = sh1106(serial, width=128, height=128, rotate=2, mode=1)

The 128 x 128 resolution is now set correct on L62 in /usr/local/lib/python3.7/dist-packages/luma/oled/device/init.py


LTR559 maximum level hit

LTR559 maximum level hit

28c, 53%, 1006mb here in my bedroom at 3PM. Readings taken by a BME680.
I’m expecting the barometer to drop as the forecast is for rain or showers for the next few days.

Trouble using the SH1106 OLED

I’ve not used the Luma module but I’d take a wild guess that this is the problem:

It should probably be device.display()

These modules tend to work the same way: you spend time putting together an image, but nothing gets passed to the screen until you call some sort of display or show function. However, to call a function you need round brackets after the name. If you don’t have those you’re actually asking “does device have something called display?” Python will go and check and then say “Yes, device does, here’s some information about it” and then carry on. That’s why your script wasn’t actually failing, device.display is a valid command, it’s just not the command you want.

Gas.py Enviroplus

Hello,

I would appreciate if somebody can explain me the following line in the gas.py library code of enviroplus, I would like to know what 56000 means, it is 56000 kohm or 56000 ohm?

try:
ox = (ox * 56000) / (3.3 - ox)
except ZeroDivisionError:
ox = 0

Thank you so much

Cristian M.

LTR559 maximum level hit

Viewing all 53895 articles
Browse latest View live