Is it possible for a raspberry pi pico W to become a client and a server using multithreading?
April 30, 2024, 12:22
risb
I want to run a webserver on the rpi pico W that can accept button presses from clients (browsers) to change some state variables and then act as a client to transmit this state data to a server running on another device.
Is this possible using multithreading or will this cause issues with the networking hardware as it may be a limited resource?
I would preferrably like to use micropython instead of the pico-sdk for C/C++ as I'm running short on time for this project
risb
I don't think anyone is even seeing these posts but
there is limited support for a lot of hardware on core1 of the arm-cortex-m0 processor, in micropython
risb
which means networking and interrupts cannot run reliably on core1
risb
therefore I can't run a client on one core and an HTTP server on another, atleast in micropython
risb
if I had the time I would have tried it out using the pico-sdk, but I don't
k9t33n
I am but I just don't exactly know how to help you
oops.se
Every users see that this has been posted, but perhaps no one know the answer.
risb
I'm sorry I was a bit on edge that day 😅
risb
the deadline has passed, and I managed to do without it
risb
I wanted it to act like a client to transmit accelerometer and gyroscope data from a sensor to a file server I had programmed on my PC
risb
which would save all that data onto csv files
risb
and I wanted it to act like an HTTP server to serve pages to a device where the user can wirelessly select the state that the user is in, eg. Sitting, Standing, Walking, Running etc
risb
I ended up adding buttons to the breadboard for each state to physically select the state instead of on a phone or laptop
risb
pressing the state buttons on the breadboard while it was in my pocket was a bit awkward but I managed to collect the data that way