Go to advanced search

by Uskompuf
Tue Feb 02, 2021 9:12 am
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

Re: MicroPython Code Saved as main.py with Thonny Not Running On Boot

Here is the complete working code: import machine import utime sda=machine.Pin(0) scl=machine.Pin(1) i2c=machine.I2C(0,sda=sda, scl=scl, freq=400000) led_onboard = machine.Pin(25, machine.Pin.OUT) utime.sleep(1) # REQUIRED to allow the SerLCD to initialise, code will not run on boot without this del...
by Uskompuf
Tue Feb 02, 2021 9:10 am
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

Re: MicroPython Code Saved as main.py with Thonny Not Running On Boot

PiGraham wrote:
Tue Feb 02, 2021 8:56 am
Strange that you didn't see the error before though.
Yeah I never saw the error only tried it out after your comment.
by Uskompuf
Tue Feb 02, 2021 8:47 am
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

Re: MicroPython Code Saved as main.py with Thonny Not Running On Boot

I solved it, I was reading online that OSError: 5 is because the device has not set a ready channel, so I added a second delay before the first write command and that fixed it.
by Uskompuf
Tue Feb 02, 2021 8:44 am
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

Re: MicroPython Code Saved as main.py with Thonny Not Running On Boot

Uncomenting lines 6 and 10 I get an error running from Thonny: Traceback (most recent call last): File "<stdin>", line 10, in <module> OSError: 5 That is either with import main or Thonny Run button. Any idea what might be causing this error, it doesn't give much information.
by Uskompuf
Tue Feb 02, 2021 5:12 am
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

Re: MicroPython Code Saved as main.py with Thonny Not Running On Boot

If you disconnect the display and just run very simple blink code in main.py does it work? Yes, this is a bit strange the program only breaks when I add the following line: i2c.writeto(114, '\x7C') #enter settings mode That code comes directly from the Pico Getting Started PDF page 118. What is goi...
by Uskompuf
Mon Feb 01, 2021 9:16 pm
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

Re: MicroPython Code Saved as main.py with Thonny Not Running On Boot

PiGraham wrote:
Mon Feb 01, 2021 11:45 am

Does it run from Thonny if you just save to Pico and click the Run button on the toolbar?
Yes
by Uskompuf
Mon Feb 01, 2021 11:17 am
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

Re: MicroPython Code Saved as main.py with Thonny Not Running On Boot

How are you powering the Pico? . . . i.e. are you connecting it to the same computer/USB cable that you used to program it? Yes I have been using the same USB cable and PC to power the Pico. I unplug the Pico after programming and then plug it back in, this is when the program doesn't run. I have a...
by Uskompuf
Mon Feb 01, 2021 11:11 am
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

Re: MicroPython Code Saved as main.py with Thonny Not Running On Boot

DWiskow wrote:
Mon Feb 01, 2021 10:59 am

Does anything happen (i.e. backlight colour change)?
Nothing happens with the display.
DWiskow wrote:
Mon Feb 01, 2021 10:59 am

Can you introduce a blink of the onboard LED to differentiate between
- the code not running
- an i2C failure
I tried some code to flash the onboard LED and it only worked when the screen worked.
by Uskompuf
Mon Feb 01, 2021 10:44 am
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

Re: MicroPython Code Saved as main.py with Thonny Not Running On Boot

DirkS wrote:
Mon Feb 01, 2021 10:42 am
How do you know it doesn't work?
The program prints text to a SerLCD screen so I can clearly tell if the programming is running or not.
by Uskompuf
Mon Feb 01, 2021 10:43 am
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

Re: MicroPython Code Saved as main.py with Thonny Not Running On Boot

Here is my code: import machine import utime sda=machine.Pin(0) scl=machine.Pin(1) i2c=machine.I2C(0,sda=sda, scl=scl, freq=400000) i2c.writeto(114, '\x7C') #enter settings mode i2c.writeto(114, '\x18') #change contrast i2c.writeto(114, '\xAA') #set contrast to 170/255 i2c.writeto(114, '\x7C') #ente...
by Uskompuf
Mon Feb 01, 2021 10:40 am
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

Re: MicroPython Code Saved as main.py with Thonny Not Running On Boot

Ok so I have saved my code to the Pico as test.py, from shell I can call import test and the program runs as expected.

If I save the file as main.py and call import main from the shell it also works.
by Uskompuf
Mon Feb 01, 2021 7:41 am
Forum: MicroPython
Topic: MicroPython Code Saved as main.py with Thonny Not Running On Boot
Replies: 24
Views: 2046

MicroPython Code Saved as main.py with Thonny Not Running On Boot

I have written a MicroPython program in Thonny 3.3.3 for Windows.
I can successfully run the program when I connect my Raspberry Pi Pico.
I have saved the file on my Pico via Thonny as main.py.
When I connect my Pico to power my program does not run.

What am I missing here
by Uskompuf
Sat Feb 29, 2020 1:56 am
Forum: Troubleshooting
Topic: Duck DNS cron not running.
Replies: 1
Views: 1014

Duck DNS cron not running.

I have followed the Duck DNS pi install guide and ran the following commands. mkdir duckdns cd duckdns nano duck.sh I added the following code to duck.sh echo url="https://www.duckdns.org/update?domains=uskompufcamera&token=1a565714-cf9e-4bee-a140-6231ff2d8c9e&ip=" | curl -k -o ~/d...
by Uskompuf
Wed Jan 29, 2020 12:02 pm
Forum: Other projects
Topic: Setup RPI-Cam-Web-Interface for remote access after installation?
Replies: 4
Views: 977

Re: Setup RPI-Cam-Web-Interface for remote access after installation?

Well RPI-Cam-Web-Interface is the exact name of the software so I thought that would be clear enough.

https://elinux.org/RPi-Cam-Web-Interface
by Uskompuf
Mon Jan 27, 2020 4:39 am
Forum: Other projects
Topic: Setup RPI-Cam-Web-Interface for remote access after installation?
Replies: 4
Views: 977

Setup RPI-Cam-Web-Interface for remote access after installation?

I have installed the rpi-web-cam-interface software and everything works great locally however I want to setup remote access.

Is there any way to change user/pass and port without reinstalling?

Thanks
by Uskompuf
Thu Jan 02, 2020 2:30 pm
Forum: Camera board
Topic: RPi Cam Web Interface
Replies: 5354
Views: 1827742

Re: RPi Cam Web Interface

I have a few questions and I was wondering if anyone could point me in the right direction. I have setup a pi zero W and V1 camera with RPI cam web interface and it's running at 972p 25fps, this seems stable without motion detection. I wish to view this stream in other applications are full quality,...
by Uskompuf
Sat Dec 28, 2019 4:24 am
Forum: Beginners
Topic: Optimal software for pi zero W camera stream
Replies: 4
Views: 1461

Re: Optimal software for pi zero W camera stream

rpiMike wrote:
Fri Dec 27, 2019 10:18 pm
https://elinux.org/RPi-Cam-Web-Interface
Thanks I've been having a look but can't figure out what resolution I can run the camera at with a pi zero W and how to stream to YouTube using it.
by Uskompuf
Fri Dec 27, 2019 8:16 pm
Forum: Beginners
Topic: Optimal software for pi zero W camera stream
Replies: 4
Views: 1461

Optimal software for pi zero W camera stream

I purchased a octocam kit with a zero W and camera module v1.3 and was wondering what is the best software to achieve a 720p/1080p 30fps stream which I can view locally and push to YouTube? Is it possible to get a decent quality stream to YouTube with ~2mbps and set it to private so YouTube handles ...
by Uskompuf
Thu Feb 01, 2018 11:01 am
Forum: Graphics, sound and multimedia
Topic: Raspberry pi + raspberry pi camera = usb webcam?
Replies: 4
Views: 3222

Re: Raspberry pi + raspberry pi camera = usb webcam?

Oh ok thanks, but everything else makes sense?

Is there much quality difference between v1.3 and v2.1, also does 720p 60 or 1080p 30 look better?
by Uskompuf
Thu Feb 01, 2018 10:34 am
Forum: Graphics, sound and multimedia
Topic: Raspberry pi + raspberry pi camera = usb webcam?
Replies: 4
Views: 3222

Re: Raspberry pi + raspberry pi camera = usb webcam?

So I should be able to install that on a raspberry pi 1b+ and run g_webcam on boot so if pi is being powered by pc whenever I turn the pc on it will detect the webcam?
by Uskompuf
Thu Feb 01, 2018 10:02 am
Forum: Graphics, sound and multimedia
Topic: Raspberry pi + raspberry pi camera = usb webcam?
Replies: 4
Views: 3222

Raspberry pi + raspberry pi camera = usb webcam?

There seem to have been a few threads about this but they all seem dead and over a year old so I was wondering if it is possible to use a camera connected to the raspberry pi camera port as a usb camera on another computer?

Thanks
by Uskompuf
Sun Jul 23, 2017 8:06 am
Forum: Beginners
Topic: Using gpio pins to open and close circuit
Replies: 1
Views: 1395

Using gpio pins to open and close circuit

Hi I want to attach my raspberry pi to a remote control which controls a rc car. I have disassembled the controller and taken of the buttons so I can see the metal contacts. Can I attach each side of the metal contacts to a gpio pin(one side of all the contacts to a single ground and the other sides...
by Uskompuf
Sat May 20, 2017 7:46 am
Forum: AIY Projects
Topic: Can the hat control dc motors
Replies: 1
Views: 524

Can the hat control dc motors

Hi I would like to control a dc motor from my raspberry pi I saw the hat has some servo Pins but don't know if these can control a dc motor do I need a hand bridge and a dc power supply and where could I attach these if possible.
by Uskompuf
Fri May 19, 2017 6:18 am
Forum: AIY Projects
Topic: Output stream and videos to display
Replies: 6
Views: 1402

Re: Output stream and videos to display

Editing the original YouTube player code I changed pkill = subprocess.Popen(["/usr/bin/pkill","vlc"],stdin=subprocess.PIPE) To pkill = subprocess.Popen(["/usr/bin/pkill","omxplayer"],stdin=subprocess.PIPE) As I set mps-youtube to use omxplayer but this breaks ...

Go to advanced search