Quantcast
Channel: Pimoroni Buccaneers - Latest posts
Viewing all 53768 articles
Browse latest View live

Gas.py Enviroplus

$
0
0

The datasheets are vague to me, but the main sheet does note that “Depending on the application and on the precision of the A/D converter, a single load resistor of 56 kOhms may be sufficient”.

Exactly what that formula is doing though I don’t know.


1.12" oled

$
0
0

Thanks for the reply but I still cannot get this to work. (This is a first for a Pimoroni board.)

I’m using a Pi 3 with a newly setup SD card (today) with OS installed via the Pi Imager and updated. When I try to run the installer I get the message
luma.core requires Python ‘> 3.5, <4’ but the running Python is 2.7.16
How can I move on?

1.12" oled

$
0
0

I’m using the script currently on the Pimoroni web site for this device.

1.12" Mono OLED Breakout 128x128

$
0
0

1.12" Mono OLED Breakout 128x128. I’ve had this board for 2 years and still cannot get it to work. I’m using a Pi 3 with a new SD card and tried to install the drivers from the current script on the website.
It down loads the luma.core and then falls over with
luma.core requires Python ‘>3.5, <4’ but the running Python is 2.7.16

Could we have a fix please? This is the first Pimoroni board I’ve failed to get working.

MicrodotPhat - dumb Python question

$
0
0

I’m building a retropie console inside an old Atari 2600 case. I’ve set up my MicrodotPhat as a mini-screen inside the old cartridge port. I’m very new to Python and Raspian and right now I’d be happy just to have the MicrodotPhat permanently display the word “Atari”.

I’ve followed the docs and can get the microdotphat to display what I want within a Python session, but the microdotphat turns blank as soon as I exit() from Python. I can also tweak the python scripts in the microdotphat examples folder to display what I want, but the script either exits immediately and blanks the screen, or if I use ‘time’ it locks up the Raspberry Pi until I ctrl-c (and then blanks the screen).

Please can someone help out this poor noob and let me know how to keep the screen display on without locking up the Raspberry Pi in a Python session (i.e., so that it can display “Atari” while Retropie continues running?). Thank you!!!

1.12" Mono OLED Breakout 128x128

$
0
0

i2c or SPI version?
Did you try the For Python3 installation, substitute the following in the instructions below.

  • pippip3 ,
  • pythonpython3 ,
  • python-devpython3-dev ,
  • python-pippython3-pip .

MicrodotPhat - dumb Python question

$
0
0

You could likely call up your python file on boot up via crontab, and run it as a service in the background.
run sudo crontab -e
then add the following line to that file and save it.
@reboot python3 /home/pi/atari.py &
Change the atari.py to the file you want to run.
The code you want to repeat should be in the “while true” section.

1.12" Mono OLED Breakout 128x128

$
0
0

Thanks, using pip3 got the drivers to finish but trying to run the setup and any of the other examples just gives a load of red error messages - so still not working properly.

This is continuing to be a very disappointing experience. Normally, with a Pimoroni board you click on the link, it installs all the necessary backgound bits and you can run the examples to see how the commands work. Installed setuptools-47.1.1

When I try these examples it just puts random dots on the left hand half of the screen and thinks is running a SSD1306 128x64 not this screen.

Sorry to say but this will put off customers.


1.12" Mono OLED Breakout 128x128

$
0
0

i2c version or SPI version?

This is how it went for me with my color SPI LCD, might help. I did finally get it working.

1.12" Mono OLED Breakout 128x128

$
0
0

I installed idle3 and have managed to get “Hello, World” on the screen.
Have you found a list of the graphic primitives anywhere with the syntax? Things like daw a single dot, line, rectangle, polygon? This is hard work without easy to follow documentation.
I’ve been using SSD1306 128x64 displays for some time and can fly them with Arduino and CircuitPython. I thought this would be similar but with twice the space.

Thanks for your help.

1.12" Mono OLED Breakout 128x128

$
0
0

I haven’t done anything with mine after making sure it worked. I have some stuff on order that I’m waiting on before going any further. PIL / Pillow is what is used to show graphics etc on mine (ST7789), as far as i know anyway. Yours I believe uses Luma?

Spotify on Raspberry Pi issues with Mopidy and Iris Web Server

$
0
0

Simon,
If you find you cannot connect to the iris web page from another device check /etc/mopidy/mopidy.conf on your pi. There is a section [http], the line following it should be
hostname = ::
if it is not “::” (I believe it defaults to something else) then you cannot access the iris website from another device.
If you have to change the file you will need to get mopidy to reload the config with
sudo systemctl restart mopidy

Hope this helps

1.12" Mono OLED Breakout 128x128

1.12" Mono OLED Breakout 128x128

$
0
0

Thanks for these. I’ve managed to get the Conway’s lIfe and the basics shapes scripts working. I’ll write my own guide in the morning. Best of luck with PILLOW.

Pirate radio software for buster

$
0
0

I am a little confused as to how to download the pirate radio software for Buster as I have seen some posts that the curl command in the documentation only works with Stretch but there is another on github which I can’t find that works with Buster and without the Vlc-nox, and lastly there was mentioned to download the phat-beat libraries using the curl one line installer but will that give me the vlcradio functionality? Sorry for all the newbie questions but hope you can help me out.


Pirate radio software for buster

$
0
0

Curl works in Buster, I’ve used it several times. There was, and may still be, an issue with Pimoroni’s curl install script for the Pirate Radio install. I’ve seen reports of a VLC error when installing on Buster.
My Pirate Radio install is the older phat Beat version and I’m still running Stretch. I haven’t had any issues in a long time so I haven’t had to reinstall.
There is a manual install option here.


The guide I originally followed was this one

If your using a Pi Zero, or Zero W you could use Jessie or Stretch instead of Buster. I’ll see if I can find my link to those images and get back to you with that link.

Found it
http://downloads.raspberrypi.org/raspbian/images/

Spotify on Raspberry Pi issues with Mopidy and Iris Web Server

$
0
0

Hi

The task to install “mopidy-iris” did complete in the script, complaining of a version issue. I have since tried to re run to confirm the exact error but now get this failure, so it won;t even run at all.

“curl: (60) SSL certificate problem: certificate has expired”

Trouble using the SH1106 OLED

$
0
0

Solved it, my own fault for trying to enable it on spi1 bus first. I had put the following in /boot/config.txt and rebooted, so originally was targeting /dev/spidev1.0.

dtoverlay=spi1-1cs,cs0_pin=16 # BCM 16 = gpio pin 36
# MISO - pin 35
# CE0 - pin 36 (default 12?)
# MOSI - pin 38
# CLK - pin 40

When that didnt work I reverted to /dev/spidev0.1 - updated my settings to run bounce, but didn’t properly reconfigure my own program to match the pinout (port 0, device 1 and gpio pin 9) - here is a minimal working example for this device https://shop.pimoroni.com/?q=PIM473

#!/usr/bin/python3

import time

from luma.core.interface.serial import i2c,spi
from luma.core.render import canvas
from luma.oled.device import sh1106

serial = spi(device=1, port=0, gpio_DC=9)

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

with canvas(device) as draw:
    draw.rectangle(device.bounding_box, outline="white", fill="black")
    draw.text((10, 40), "Hello World", fill="white")

time.sleep(5)

with canvas(device) as draw:
    draw.rectangle(device.bounding_box, outline="black", fill="white")
    draw.text((10, 40), "Hello World", fill="black")

time.sleep(5)

p.s. Thanks to Shoe for the helpful comments regarding syntax - that line was a complete red herring however, as the canvas object automatically flushes the image when the with block completes, and took me down the wrong path. I think it was the ordering of the parameters and tired eyes that made me think (device 0, port 1) was targeting spidev0.1 - plus I omitted the gpio pin. Sadly, even with this now working code, I still could not get spi1 to work yet, even with the demos, however I guess those pins can now be used for something else.

Trouble using the SH1106 OLED

$
0
0

that line was a complete red herring however, as the canvas object automatically flushes the image when the with block completes

Ah, interesting. Glad you got it working anyway.

Pico-8!

$
0
0

Hope I’m not bringing up a topic which is too old, but I just happened to notice this thread while I was browsing the forums. And I happened to have PICO-8 set up and running on my Pi, including a Picade build!

Admittedly I’ve done this a while ago already and even at that time the online tutorials were slightly out-of-date already. I am not sure if anyone has made a newer tutorial in the mean time, but while I was busy I did write down some notes for a friend of mine. I might as well share those here, perhaps they are of use to you still, @Nahual! Now this is in no way tutorial-quality and it’s missing a few steps, but it might help you out. You’ll notice I’m referencing some files and a Google Drive. Those are obviously not included, but I can see what I can do! Just know that I sourced those logos from the internet anyway, so a Google search might help you out quicker. :-) Let’s see if copy-pasting them here doesn’t mess up the formatting (hint: it did, let me fix some things best I can):

Installing PICO-8 on Retropie

Instructions mostly gotten from https://www.lexaloffle.com/bbs/?tid=3935 but it’s a bit outdated and missing quite a few things.

  1. Make sure SSH is enabled in Retropie
    You’ll want to have a direct network connection between your PC and your pi, for ease of set up. Go to the Retropie configuration menu and select Raspi-config. Within this menu, select option 5 Interfacing Options. From there you can turn on P2 SSH by following the instructions.
  2. Copy the PICO-8 executable to your pi
    On your Windows system, open a command prompt and navigate to the folder where you’ve got your PICO-8 distributable zip file stored. You’ll want to copy the zip file to a folder on your pi, where the default user has access to. In this case, I would opt for /tmp/ but substitute whatever is to your liking. Now, use the scp command as follows substituting filename, login, machinename and target folder as desired:
    scp <filename> <login>@<machine>:<folder>
    In my case that would be as follows:
    scp pico-8_0.1.12c_raspi.zip pi@picade:/tmp
    When prompted, enter the password for the login. If you have left this to its default, this should be raspberry
  3. SSH into your Picade via your PC
    Next connect to your pi via
    ssh -l pi <name of machine>
    For example, for me that would be:
    ssh -l pi picade
    When prompted, enter the default password.
  4. Move and unzip the pico-8 executable
    Via SSH, move the file to the desired location and unzip it. I would recommend the ports folder to keep things organized. Do the following:
    sudo mv /tmp/pico-8_0.1.12c_raspi.zip /opt/retropie/ports/
    cd /opt/retropie/ports
    sudo unzip pico-8_0.1.12c_raspi.zip
    This should create a pico-8 folder under your ports folder.
  5. Create a roms folder
    For easy access from your network via samba, create a roms folder among the other emulators. While still SSH’d into the pi, this would be:.
    mkdir ~/RetroPie/roms/pico-8
  6. Adjusting themes: carbon
    Let’s start with the default carbon theme. On the pi go to /etc/emulationstation/themes/carbon and create a pico-8 folder. So something like:
    cd /etc/emulationstation/themes/carbon
    sudo mkdir pico-8
    On a different prompt, scp the logos you want (p8*.png?) to the /tmp/ folder of your pi.
    scp p8*.png pi@picade:/tmp
    Next on your pi, move the transferred logos to the recently made /etc/emulationstation/themes/carbon/pico-8 folder, so you can reference them in the theme-file:
    sudo mv /tmp/p8*.png /etc/emulationstation/carbon/pico-8/
    (some missing instructions I’ll get to later, basically follow the theming instructions on the linked page)
  7. Adjusting themes: picade
    Oh man, this one was simple! As long as you set up the es_systems.cfg properly as described below, you’ll only need to add an svg logo to make the picade theme work! Thanks to how the theme dynamically looks up assets by use of the theme tag in es_systems.cfg (I added an appropriate image to the Google Drive named pico-8.svg but you can use any that you want)
    Just copy the svg file to the /tmp/ folder and then move it to the logos folder of the theme, like so:
    sudo mv /tmp/pico-8.svg /etc/emulationstation/themes/picade/_inc/logos/
  8. Add PICO-8 to es_systems.cfg
    (forthcoming)
    sudo nano -w /etc/emulationstation/es_systems.cfg
    Then add the following:

<system>
<name>pico8</name>
<fullname>PICO-8</fullname>
<path>/home/pi/RetroPie/roms/pico-8</path>
<extension>.p8 .p8.png .P8 .P8.PNG</extension>
<command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 "/opt/retropie/ports/pico-8/pico8 -run %ROM%"</command>
<platform></platform>
<theme>pico-8</theme>
</system>
Next up, do the following:
sudo cp /etc/emulationstation/es_systems.cfg /opt/retropie/configs/all/emulationstation/
Note: I just found out that by manually editing and copying this file, you kind of get in the way of RetroPie auto-updating the config file as in it will only update one from then on. Not sure how to correct this yet. Just make sure to keep on copying this file whenever installing new systems/emulators or they won’t show up in the RetroPie menu.

  1. Copy roms to pi
    Get your roms on the pi, via the network share or such. For some reason that I can’t grasp yet, make sure to rename any .p8.png extensions to .p8 for the games to be detected correctly!
    rename.ul .p8.png .p8 *.p8.png
  2. Install libwiringpi
    A few versions ago, a dependency was introduced which is no longer included by default with the distributable. Install it manually by executing the following:

sudo apt-get install wiringpi

  1. Set up a custom control scheme (for Picade only!) to remap the buttons correctly
    The quickest and easiest way is to use the keyconfig menu, as described on https://pico-8.fandom.com/wiki/Keyconfig. For this you will need a keyboard, so I recommend hooking one up or using a bluetooth one. Now, either run a cartridge and press the escape button or quite EmulationStation via the F4 key, navigate to the PICO-8 folder and start pico-8 in development mode via
    ./pico8
    When you’re in the PICO-8 command prompt, input the keyconfig command to call up the menu and bind your controls as desired. I’d recommend using the Picade controls to map player 1 and leave player 2 on default (by pressing the delete key on your keyboard). Press escape to confirm and enter the command shutdown to exit. Now you can enter back into EmulationStation by exiting the prompt (with exit) or rebooting entirely. When now playing PICO-8 games the controls should work as setup, with the caveat that if you’ve mapped the escape key to a Picade-button, this will still put PICO-8 in dev mode when pressed. Keep a keyboard closeby for these occasions (or until I’ve figured out how to remap controls via Retropie and disable that escape key in PICO-8).

Now you’re all ready to play some faux-retro indie games on your faux-retro cabinet!

Viewing all 53768 articles
Browse latest View live