Hi
I am go through the ML 101 w/ Lobe and BrainCraft tutorial.
I downloaded the image /raspios_armhf/images/raspios_armhf-2021-05-28 as recommended in the instructions.
Questions.
I should be running the 64bit version and not the 32bit image, correct?
I ran raspi-config but VNC and wireless don't seem to work, is this still the OS version to use for the braincraft hat? If possible I would like to use wireless and VNC to do the tutorial.
Thanks,
Dave
OS install with braincraft for Lobe tutorial
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- davidb21
- Posts: 49
- Joined: Mon Mar 24, 2014 9:13 am
- davidb21
- Posts: 49
- Joined: Mon Mar 24, 2014 9:13 am
Re: OS install with braincraft for Lobe tutorial
For reference, here is the blurp I was reading:
Bullseye Desktop Version Breaking Changes
Raspberry Pi recently release a new major version of Raspberry Pi OS called Bullseye. In our testing the desktop version, which is the default installation with the Raspberry Pi imager, it may not work.
The last known for-sure tested-and-working version is May 28, 2021 (https://downloads.raspberrypi.org/raspi ... 021-05-28/) from https://downloads.raspberrypi.org/raspios_armhf/images/.
We have applied a fix, but it hasn't been thoroughly tested. Please let us know if you are having issues and you can use the previous release in the meantime.
Bullseye Desktop Version Breaking Changes
Raspberry Pi recently release a new major version of Raspberry Pi OS called Bullseye. In our testing the desktop version, which is the default installation with the Raspberry Pi imager, it may not work.
The last known for-sure tested-and-working version is May 28, 2021 (https://downloads.raspberrypi.org/raspi ... 021-05-28/) from https://downloads.raspberrypi.org/raspios_armhf/images/.
We have applied a fix, but it hasn't been thoroughly tested. Please let us know if you are having issues and you can use the previous release in the meantime.
- davidb21
- Posts: 49
- Joined: Mon Mar 24, 2014 9:13 am
Re: OS install with braincraft for Lobe tutorial
In looking at this:
https://github.com/adafruit/Raspberry-P ... /issues/67
It looks like this may no longer be an issue, can anyone confirm the PiTFT works with the current PI OS?
https://github.com/adafruit/Raspberry-P ... /issues/67
It looks like this may no longer be an issue, can anyone confirm the PiTFT works with the current PI OS?
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: OS install with braincraft for Lobe tutorial
We know the PiTFT works with Bullseye, yes.
- davidb21
- Posts: 49
- Joined: Mon Mar 24, 2014 9:13 am
Re: OS install with braincraft for Lobe tutorial
I installed bullseye and so far no issues. Showing the desktop on the small TFT is pretty cool. I was trying to figure out how I could us VNC to on the pi that has the braincraft hat and get a higher resolution. I tried setting the headless resolution from the desktop and also using the command line raspi-config but can't seem to get a VNC resolution higher than what is being displayed on the TFT screen. Any ideas?
- davidb21
- Posts: 49
- Joined: Mon Mar 24, 2014 9:13 am
Re: OS install with braincraft for Lobe tutorial
I was working on each of the examples in the braincaft tutorial but when I got to the servo test had some problems.
python servo_test.py
Traceback (most recent call last):
File "/home/pi/Downloads/servo_test.py", line 7, in <module>
pwm = pulseio.PWMOut(SERVO_PIN, frequency=50)
AttributeError: module 'pulseio' has no attribute 'PWMOut'
Any ideas?
python servo_test.py
Traceback (most recent call last):
File "/home/pi/Downloads/servo_test.py", line 7, in <module>
pwm = pulseio.PWMOut(SERVO_PIN, frequency=50)
AttributeError: module 'pulseio' has no attribute 'PWMOut'
Any ideas?
- davidb21
- Posts: 49
- Joined: Mon Mar 24, 2014 9:13 am
Re: OS install with braincraft for Lobe tutorial
Regarding the resolution, I found a manual work around. To get a bigger desktop while using VNC I take the pi over to another LCD panel and plug it into the second HDMI port and then I can change the resolution in the gui desktop from the screen config menu drop down. This is really helpful when troubleshooting an issue rather than just having a SSH terminal because downloading test code can be done from the RPI browser rather than downloading it from my main computer and then using scp to push it to the pi.
If only I could find a device to fake a lcd on the second hdmi port because I like having the tiny lcd screen when my project is in production mode, but want a full desktop when fixing issues that come up when developing each iteration of the code.
If only I could find a device to fake a lcd on the second hdmi port because I like having the tiny lcd screen when my project is in production mode, but want a full desktop when fixing issues that come up when developing each iteration of the code.
- davidb21
- Posts: 49
- Joined: Mon Mar 24, 2014 9:13 am
Re: OS install with braincraft for Lobe tutorial
Just order some ghost hdmi dongle that will tell the pi that there is a lcd on the 2cnd hdmi port allowing higher resolution when using VNC, let see if this works.
- davidb21
- Posts: 49
- Joined: Mon Mar 24, 2014 9:13 am
Re: OS install with braincraft for Lobe tutorial
I found a solution to the servo, the sample code needs an update, try the servo code located here:
https://github.com/adafruit/Adafruit_Le ... WM/code.py
If using the brainhat change the code so it uses pin 12
https://github.com/adafruit/Adafruit_Le ... WM/code.py
If using the brainhat change the code so it uses pin 12
- davidb21
- Posts: 49
- Joined: Mon Mar 24, 2014 9:13 am
Re: OS install with braincraft for Lobe tutorial
Correction, here is the code you need:
# SPDX-FileCopyrightText: 2020 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import time
import board
import pwmio
# Initialize PWM output for the servo (on pin D12):
servo = pwmio.PWMOut(board.D12, frequency=50)
# Create a function to simplify setting PWM duty cycle for the servo:
def servo_duty_cycle(pulse_ms, frequency=50):
period_ms = 1.0 / frequency * 1000.0
duty_cycle = int(pulse_ms / (period_ms / 65535.0))
return duty_cycle
# Main loop will run forever moving between 1.0 and 2.0 mS long pulses:
while True:
servo.duty_cycle = servo_duty_cycle(1.0)
time.sleep(1.0)
servo.duty_cycle = servo_duty_cycle(2.0)
time.sleep(1.0)
# SPDX-FileCopyrightText: 2020 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import time
import board
import pwmio
# Initialize PWM output for the servo (on pin D12):
servo = pwmio.PWMOut(board.D12, frequency=50)
# Create a function to simplify setting PWM duty cycle for the servo:
def servo_duty_cycle(pulse_ms, frequency=50):
period_ms = 1.0 / frequency * 1000.0
duty_cycle = int(pulse_ms / (period_ms / 65535.0))
return duty_cycle
# Main loop will run forever moving between 1.0 and 2.0 mS long pulses:
while True:
servo.duty_cycle = servo_duty_cycle(1.0)
time.sleep(1.0)
servo.duty_cycle = servo_duty_cycle(2.0)
time.sleep(1.0)
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: OS install with braincraft for Lobe tutorial
The Pixel GUI is written to use the GPU, which only feeds data to the RasPi’s HDMI hardware path. Our ‘fbcp’ utility works by copying data from the HDMI framebuffer to the PiTFT.davidb21 wrote:I was trying to figure out how I could us VNC to on the pi that has the braincraft hat and get a higher resolution.
That means you have two options for the PiTFT and the HDMI output to a display:
1 - make the HDMI screen the same size as the TFT and copy pixel data over directly
2 - make the HDMI screen larger than the TFT, and scale the image down for the TFT
Option 1 gives you a nice, crisp image on the TFT at the cost of making the HDMI output timy. Option 2 gives you normal output on the HDMI display at the cost of a badly blurred and usually unreadable image on the TFT.
Unfortunately there’s no way around that tradeoff.
- davidb21
- Posts: 49
- Joined: Mon Mar 24, 2014 9:13 am
Re: OS install with braincraft for Lobe tutorial
Thanks for the ideas. I got the ghost hdmi dongles and they work good for my use case.
I like the TFT as configured out of the box when it is running in production mode but if there is a problem I would like to have the VNC session at the higher resolution in which case I just plug in the ghost hdmi dongle. It has been working well for me and the dongle is under $20.
I also like that with the dongle I can build another unit without custom configuration and having to remember how I did which I always forget since my production units may be running for months or years before they present some type of issue and my head is now on some other project.
The braincraft was made for AI but it is super useful as a general industrial shield. If there where one other option that would be cool it would have a e ink display because with those you can put a code or status to the screen that persist even if the unit died or lost power if not on a UPS.
The form factor of this shield with its ports so nice to put into a bigger project working as a sub-system. Keep up the great work.
I like the TFT as configured out of the box when it is running in production mode but if there is a problem I would like to have the VNC session at the higher resolution in which case I just plug in the ghost hdmi dongle. It has been working well for me and the dongle is under $20.
I also like that with the dongle I can build another unit without custom configuration and having to remember how I did which I always forget since my production units may be running for months or years before they present some type of issue and my head is now on some other project.
The braincraft was made for AI but it is super useful as a general industrial shield. If there where one other option that would be cool it would have a e ink display because with those you can put a code or status to the screen that persist even if the unit died or lost power if not on a UPS.
The form factor of this shield with its ports so nice to put into a bigger project working as a sub-system. Keep up the great work.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: OS install with braincraft for Lobe tutorial
Glad to hear you found a solution that works fo4 you. Happy hacking!
Please be positive and constructive with your questions and comments.