Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:37 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMiteWeb lessons

     Page 2 of 5    
Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 12:05pm 27 Feb 2023
Copy link to clipboard 
Print this post

  LucV said  And for one reason or another mm.info$(ipadress) gives an error.


Just in case it is the obvious there should be two d's in ipaddress.

If that isn't the issue then I'm sure Peter would appreciate knowing what the error message actually is.

Best wishes,

Tom
Edited 2023-02-27 22:05 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9130
Posted: 12:11pm 27 Feb 2023
Copy link to clipboard 
Print this post

? mm.info(ip address)
 
LucV

Regular Member

Joined: 19/02/2023
Location: Netherlands
Posts: 62
Posted: 01:43pm 27 Feb 2023
Copy link to clipboard 
Print this post

Stupid language barrier.
In Dutch there is 1 d in address. Also one s but IU had that covered.......

Thanks guys.

Luc
Luc's tech Blog
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 09:39pm 28 Feb 2023
Copy link to clipboard 
Print this post

I have everything working OK except that



Why do I get the line "String is    GET/favicon.ico HTTP"
I did have Peter's web page loaded but it is no longer on the Pico so where did this line come from?
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
LucV

Regular Member

Joined: 19/02/2023
Location: Netherlands
Posts: 62
Posted: 09:43pm 28 Feb 2023
Copy link to clipboard 
Print this post

Hello Again,

Here is chapter 5

Not very exiting this time.
Just a command to find your IP address easier and Peter's new code for starting the webserver. Two easy additions.

Have fun.

Chapter-05.pdf

Luc
Luc's tech Blog
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 722
Posted: 09:53pm 28 Feb 2023
Copy link to clipboard 
Print this post

Do
  WEB tcp interrupt poll
Loop


Would be better, I think, to use Interruptlabel or ISR instead of poll.

THX
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 722
Posted: 09:59pm 28 Feb 2023
Copy link to clipboard 
Print this post

Sure, that WEB tcp interrupt poll is repeated over and over in the do loop?
For my understanding, this is initialised once.

Maybe I am totally wrong, did not test it.

THX
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6101
Posted: 10:11pm 28 Feb 2023
Copy link to clipboard 
Print this post

WEB tcp interrupt serversubroutine

should be used once, before the
DO
LOOP

It would be better if the SUB was not named 'poll' because that sounds like it has to be polled.

Jim
VK7JH
MMedit   MMBasic Help
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 722
Posted: 10:20pm 28 Feb 2023
Copy link to clipboard 
Print this post

  TassyJim said  
WEB tcp interrupt serversubroutine

should be used once, before the
DO
LOOP

It would be better if the SUB was not named 'poll' because that sounds like it has to be polled.

Jim


Jim, thanks for your confirmation
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 10:35pm 28 Feb 2023
Copy link to clipboard 
Print this post

Anyone got an answer to my above question and also when I first run the program I get an NTP timeout error, the second time it works OK. I think this was mentioned in Peter's thread but I can't find it.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
LucV

Regular Member

Joined: 19/02/2023
Location: Netherlands
Posts: 62
Posted: 10:42pm 28 Feb 2023
Copy link to clipboard 
Print this post

  Quote  
should be used once, before the
DO
LOOP



Oops it's late over here.
You are right.
Was in the program but made a mistake in copying the previous code.
Going to correct it tomorrow.

Should indeed be:

WEB tcp interrupt poll

Do
Loop

The subroutine can be renamed to some other name.

Luc
Luc's tech Blog
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 10:58pm 28 Feb 2023
Copy link to clipboard 
Print this post

Still got the NTP TIMEOUT problem, I tried a pause but that didn't work.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 292
Posted: 11:12pm 28 Feb 2023
Copy link to clipboard 
Print this post

I also have an issue with NTP timeout. I sort of wish we could define which NTP server we want to use.
Edited 2023-03-01 09:13 by pwillard
 
TheMonkeys

Regular Member

Joined: 15/12/2022
Location: Australia
Posts: 59
Posted: 02:47am 01 Mar 2023
Copy link to clipboard 
Print this post

  palcal said  I have everything working OK except that

Why do I get the line "String is    GET/favicon.ico HTTP"
I did have Peter's web page loaded but it is no longer on the Pico so where did this line come from?


That's standard Browser behaviour. If you don't specifically provide an icon link for the page, it looks for "favicon.ico" by default. Once it gets the favicon, it won't ask/look again.

Cheers,

Chris.
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 359
Posted: 09:30pm 01 Mar 2023
Copy link to clipboard 
Print this post

Thanks Luc for the good lessons! ... and Peter for making everything possible.
I got my first Pico W today and started to test with Peter's test programs.
The easy part was to connect to the router and get NTP time and date.
The difficult part was to get Pico to respond. Typing 192.168.8.187 in varoius browsers did not give any response. Changed a lot of WEB security settings....
Then I added OPTION TCP SERVER PORT 80 and everything functioned  

Luc, may I suggest that you add the "OPTION TCP SERVER PORT 80" to the starting chapter of your book. (Just to avoid that others struggle with the same mistake as me.)

What I have experienced during a few hours of PicoMiteWEB is far above my expectations. Flash in the firmware, load the program with MMEdit+MMCC,Power On and connection is reliably established. (All in a very few minutes.)
I haven't had the same "flow" with any of the ESP8266 modules in the past. In fact the stumbling started already at the firmware flashing with a myriade of code-parts to puzzle together (without having the puzzle-picture visible).

/Pluto
 
LucV

Regular Member

Joined: 19/02/2023
Location: Netherlands
Posts: 62
Posted: 09:55pm 01 Mar 2023
Copy link to clipboard 
Print this post

Ok guys here is the next chapter.
Nothing exciting this time.

It covers the easy way to get your IP number, and the new WEB TCP interrupt call that replaces the poll command.

Thanks to TassyJim I also incorporated his NTP timeout program that is usefull if you keep getting Timeout errors from your NTP server.


Chapter-05.pdf


If you find spelling mistakes or any other things that might enhance these chapters please PM me so I can make alterations or additions. Remember that English is not my native language and at this time I am working simultaneously with 4 languages (Basic, C++, Javascript and Python) so I am bound to make mistakes.

Have fun,

Luc
Edited 2023-03-02 07:56 by LucV
Luc's tech Blog
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 04:17am 02 Mar 2023
Copy link to clipboard 
Print this post

Hi Luc,  You already sent Chapter-5

Edit....seems like an updated version
Edited 2023-03-02 14:21 by palcal
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6101
Posted: 04:56am 02 Mar 2023
Copy link to clipboard 
Print this post

Luc,
I noticed that your screenshots of MMCC have a few missing settings.



You should select 'picomite' as the device type. There are a number of things that this configures and users will have problems at times if this is not set correctly.

Even though the standard picomite configuration uses USB and the baud rate doesn't matter, some users will elect to use the alternative serial port which does require the baudrate to be set. Having a baud rate set will also allow MMCC to make a few decisions so it is definitely preferable to have the rate set. I use 115200 but any rate other than 1200 will do.

Jim
VK7JH
MMedit   MMBasic Help
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 722
Posted: 06:05am 02 Mar 2023
Copy link to clipboard 
Print this post

Hello Luc,

nice Job, thank you.

Naming the ISR serverstart „WEB tcp interrupt serverstart“
should be avoided.
The Server ist started on Top of the Program.
The ISR is just the „Jump Vector“ when the Interrupt is fired up.

This could lead to some misunderstandings, in special for Beginners, that will love your  Chapters.

Dietmar
Edited 2023-03-02 20:50 by atmega8
 
LucV

Regular Member

Joined: 19/02/2023
Location: Netherlands
Posts: 62
Posted: 07:46pm 04 Mar 2023
Copy link to clipboard 
Print this post

Here is the4 next chapter.

In this chapter some real data is displayed on the webpage.
To make things easy a random number is displayed and each time a different one.

You can easily change this in a real sensor reading, button state etc.

Have fun.


Chapt-06.pdf


Luc
Luc's tech Blog
 
     Page 2 of 5    
Print this page
© JAQ Software 2024