krzmaz / pico-w-webserver-example Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Let's add linters to express and enforce the projects preferred coding style
Thanks, your example is very good and unique.
I'm working with pi pico with C and Windows 10 (Spanish version).
I have problems with the file "my_fsdata.c" the the content is
#define FS_ROOT file
#define FS_NUMFILES 0
It means, no file was found and an error was reported by the cmake.
->FIND: formato de parámetros incorrecto<- or "FIND wrong parameter format".
I have the files from your example, into the project.
\src\fs\index.html
\src\fs\ssi.shtml
The Perl file is running from \src\external
The PERL version is : This is perl 5, version 32, subversion 1 (v5.32.1) built for MSWin32-x64-multi-thread
The find line is:
chdir("fs");
open(FILES, "find . -type f |");
Please, do you know which can be the problem into this PERL file ?
Thanks Carlos
The configuration endpoint needs to have a form containing WiFi SSID and password, and allow easy addition of new fields
The compiler complains that the bool state is not initialised in ssi.c.
Easily fixed by
bool state = 0;
on those lines.
Thanks for a very useful example.
When the board enters setup mode, an Access Point needs to be created to allow connecting from another device to an configuration endpoint for now hosting a blank "hello world" page.
Not to depend on serial port communication to obtain IP address, let's use mDNS
Ubuntu with Build chain installed as per Pico C/C++ doco; Wifi Scan example project builds and runs okay.
I currently dont know enough about CMake/Build process be able to debug the build process yet, except for the cmake build.
Vanilla instance of pico-w-webserver-example
Build within vscode OR using ./build.sh results in Build error:-
[build] [ 98%] Building C object src/CMakeFiles/pico_w_webserver.dir/home/mat/pico/pico-sdk/src/rp2_common/hardware_adc/adc.c.obj
[build] [100%] Linking CXX executable pico_w_webserver.elf
[build] /usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: cannot find -lcyw43_driver_base: No such file or directory
[build] collect2: error: ld returned 1 exit status
[build] gmake[2]: *** [src/CMakeFiles/pico_w_webserver.dir/build.make:2967: src/pico_w_webserver.elf] Error 1
[build] gmake[1]: *** [CMakeFiles/Makefile2:1638: src/CMakeFiles/pico_w_webserver.dir/all] Error 2
[build] gmake: *** [Makefile:91: all] Error 2
[proc] The command: /usr/bin/cmake --build /home/mat/pico/pico-w-webserver-example-main/build --config Debug --target all -j 10 -- exited with code: 2
If it helps, cmake tracing shows;
Running with expanded trace output on.
-- Found Perl: /usr/bin/perl (found version "5.34.0")
-- Defaulting build type to 'Release' since not specified.
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/arm-none-eabi-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/arm-none-eabi-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python3: /usr/bin/python3.10 (found version "3.10.6") found components: Interpreter
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mat/pico/pico-w-webserver-example-main/build
Useful resource: https://www.makermatrix.com/blog/read-and-write-data-with-the-pi-pico-onboard-flash/
Due to the wear considerations (flash having the lifetime of 1000-10000 write-erase cycles), best would be to start with https://github.com/littlefs-project/littlefs as CMake external project dependency. If that's too problematic, a simpler approach can be considered with proper warnings to the users, see: https://arduino-pico.readthedocs.io/en/latest/eeprom.html.
Within this issue, retrieving the configuration during preparation of the configuration page and writing the data entered in the configuration page to flash is enough.
Similar to the pico_bootsel_via_double_reset, the code will enter AP mode when the board is reset twice within a certain amount of time.
For now, the setup mode can be mocked by an infinite loop with flashing LED.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.