Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:43 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 3 of 5    
Author Message
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 01:05am 05 Mar 2023
Copy link to clipboard 
Print this post

Luc,

Very readable, helpful and interesting series, thanks.

An observation: you have not (that I have seen) made mention of the <x> </x> constructs that form the basis of html. Eg. your html file with text to display is based on the assumption by browsers that just plain text has an implied <p> at the start and a </p> at the end.

Would it be helpful to expand on this a little further in your document, particularly if you plan to go further into tables, forms, divisions etc?

Thanks again for a very useful thread,
Regards,
Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
LucV

Regular Member

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

You are right Doug.
But also aheade of what is coming  

Luc
Luc's tech Blog
 
LucV

Regular Member

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

Here it is:


Chapt-07.pdf


Chapter 7

This chapter discusses how to get fonts in different sizes on your webpage, give the webpage a background color. Give your text a (different) color and give elements like text a different background color,

Next to that it discusses how to deal with the fact that a webpage on your phone or tablet looks completely different from the same page on your computer.

Have fun
Luc's tech Blog
 
palcal

Guru

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

@ Luc
In chapter 7 you say
  Quote  The next part an HTML file should have is a header. The header opens with
<header> and closes with </header>

This did not work for me I had to change <header> to <head>

What a great tutorial
THANKS    
"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: 03:34pm 15 Mar 2023
Copy link to clipboard 
Print this post

Sorry guys but things are very busy around here.
I am finishing my new book............

Nevertheless here is a new chapter.

Chapter 8 discusses 2 webservices that offer free images and pictures
for us to use for any purpose (yes also commercial). I used one of the pictures in chapter 8.

Another webservice that is introduced is a webservice where you can upload pictures and graphics for free for an unlimited time.

What does that have to do with the PicoMiteWeb ???
Well this chapter discusses how to retrieve these graphics and show them on your webpage. And do not worry it is lightning fast so you will not know that the pictures are coming from a remote server.

I was trying to upload chapter 8 but got the error Entity too large. The file was just over 1 MB so that is awkward. So I herebye provide a different download link:

Chapter 8
Luc's tech Blog
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 722
Posted: 03:40pm 15 Mar 2023
Copy link to clipboard 
Print this post

  LucV said  Sorry guys but things are very busy around here.
I am finishing my new book............

Nevertheless here is a new chapter.

Chapter 8 discusses 2 webservices that offer free images and pictures
for us to use for any purpose (yes also commercial). I used one of the pictures in chapter 8.

Another webservice that is introduced is a webservice where you can upload pictures and graphics for free for an unlimited time.

What does that have to do with the PicoMiteWeb ???
Well this chapter discusses how to retrieve these graphics and show them on your webpage. And do not worry it is lightning fast so you will not know that the pictures are coming from a remote server.

I was trying to upload chapter 8 but got the error Entity too large. The file was just over 1 MB so that is awkward. So I herebye provide a different download link:

Chapter 8


What a suspect Donload Side, why not directly from trhe backshed?
 
LucV

Regular Member

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

  Quote  I was trying to upload chapter 8 but got the error Entity too large. The file was just over 1 MB so that is awkward. So I herebye provide a different download link:


That is why I had to use another service.

Nothing wrong with Mediafire. I have been using it for ages and never had a problem with them. Many users from my forum have downloaded my files from that site.
Luc's tech Blog
 
palcal

Guru

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

I'm not paying for a subscription to MediaFire, I was really interested too, and I do worry downloading from sites with all the other download ads.
Why not just split the chapter into two parts.
Edited 2023-03-16 06:37 by palcal
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2140
Posted: 09:40pm 15 Mar 2023
Copy link to clipboard 
Print this post

If you click the download button it takes you to another page, click the Chapt-8 button and it downloads for free.
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 09:50pm 15 Mar 2023
Copy link to clipboard 
Print this post

Thanks Phil, that was painless.
"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:38pm 15 Mar 2023
Copy link to clipboard 
Print this post

No strange things on my side. Tried with Firefox, Chrome and Edge.
Just click the link, the Mediafire page opens and then just click on the download button.

No subsciption or whatever needed.

Still strange that I can not upload to the BackShed as the file is just over 1 MB and when uploading the forum software says you can upload till 10Mb but still I get an error...... Anyone ???

Maybe one of you can download the file from Mediafire and try to upload it here......... Maybe there is a restriction for me being a newbee.......
Edited 2023-03-16 08:39 by LucV
Luc's tech Blog
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2140
Posted: 11:42pm 15 Mar 2023
Copy link to clipboard 
Print this post

Chapter 8 zip.
Chapt-08.zip
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 02:05am 16 Mar 2023
Copy link to clipboard 
Print this post

@Luc,

I note that you are using <header>  </header>  to enclose your  <title> information? According to W3School, it is indicated that header be used for general info about the webpage such as info on the web site, author etc.

Alternatively, the construct <head>   </head> is to be used for meta data and in fact this is where the <title>  </title construct should be embedded.

I am not an HTML expert by any means and I am asking out of interest, not criticism,

Thanks for an interesting series,
Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
LucV

Regular Member

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

And there we go.
I am still lacking time. My new book is coming along. The Dutch version is now on proof-read and then can be send to the printer !!! Then the English version (which is already written) is next in line to get proof-read and then printed.

For who is interested this book is about Javascript and HTML.

Back to the Shed ;)

As Chapter 9 is less then 1 MB it uploads just fine.

In this chapter we are going to enhance the webpage more.

First thing is to add a table to the page so we can put some order to our data.
Next step is to give the table a header so we know what it's about.
Then the chapter shows how to give the table a different color as the standard webpage background

Then comes the fun part.
The previous chapter shows how to put a graphic on your webpage.
This chapter shows how to put significant graphics in the table so your data really looks nice.

Here is how the webpage will look:






And here is the chapter that puts it all together:

Chapt-09.pdf
Luc's tech Blog
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 847
Posted: 09:21pm 24 Mar 2023
Copy link to clipboard 
Print this post

Luc,
Thank you for putting in the time and effort to produce the documents.
They are very much appreciated. I will admit to not fully understanding them all yet but I am getting there.

Could you possibly summarise (repeat?) where each file resides (i.e. on both the devices and in which 'directory' if relevant)?

You mention a couple of times "phone" and "tablet". Is it possible to run the .html on iDevices? How?
Can we use iDevices to control MMBasic devices as per IOT? (I'm not rushing into the "how" as this will have to wait until I understand a lot more).

Cheers,

Andrew
 
LucV

Regular Member

Joined: 19/02/2023
Location: Netherlands
Posts: 62
Posted: 12:30pm 25 Mar 2023
Copy link to clipboard 
Print this post

@Andrew

Hey Andrew.
There are in each chapter just two files involved. The first is server-xx.bas in which the xx stands for the version number. And xxxx.html in which the xxxx stand for the chapter number.

For Chapter nine that is server09.bas and nine.html.
Both files are written in MMEdit and then saved on the PicoMiteWeb and saved on your PC. Sacving to the PC is just for safety. If you install new firmware on the PicoMiteWeb all its files might evaporate. So if that happens you will have copies on your PC.

So both files are on the PicoMiteWeb.
When you start the server09.bas program the first thing it does is to show you the IP address the PicoMiteWeb automatically got assigned from the router.

In my case that looks like this:
Your IP address is : 192.168.1.86

Now the only thing you have to do is to point your browser to this address.
And with browser I mean any browser on your PC/Tablet or Phone. And on any device be it PC/Mac/Android or Idevice.
Each device has a browser and all browsers support HTML because every webpage you visit is just plain HTML code.

And please remember that you do not have to use all these fancy colors, graphics and tables. If you follow the chapters 1 to 7 you can put any information you like in plain text on a webpage.

Why on a webpage.
Well obvious. You put the PicoMiteWeb in your mancave or attick or garage or whereven you want. Add some sensors to it and adjust the basic program and HTML file.
From then on you can look at temperature or if a door is open or closed or if someone is whith his fingers in the cookie jar. You can even attach a vivration sensor and have the Picomite tell you that the washing machine is ready.
And where:
Well because the PicoMiteWeb sets this info on a webpage you can look at it from any device on the cosy loungechair in your living room ao whatever.

Next lessons will show how to work the orther way round.
They will show how to put a button on the webpage and when you press that (again whereever you are in your house) a led will go on on the PicoMiteWeb.
Replace the led by a relay and you can put on real lamps/ventilators/coffee machines or whatever.
Edited 2023-03-25 22:31 by LucV
Luc's tech Blog
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 847
Posted: 08:02pm 25 Mar 2023
Copy link to clipboard 
Print this post

Hi Luc,
Thanks for your reply. I've been over-thinking it again.
I didn't think that it mattered but I am living in a hotel. I bet that their system is blocking my access.
I get their IP address but when I attempt to connect it times out.
I'll have to be patient and wait until I move back into my own home (September/October).

Many thanks again.

Andrew
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2140
Posted: 09:38pm 25 Mar 2023
Copy link to clipboard 
Print this post

"I'll have to be patient and wait until I move back into my own home"

If you know where your home router/modem is stored (and can get access to) it may be possible to use it where you are.
To try these lessons only local WiFi is needed, it doesn't need internet access.
Both the Pico and your tablet can be configured to use it's settings then talk to each other.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 09:46pm 25 Mar 2023
Copy link to clipboard 
Print this post

  Andrew_G said  I get their IP address but when I attempt to connect it times out.

If you have a cell phone which offers a hotspot, you should be able to connect using that.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6101
Posted: 09:50pm 25 Mar 2023
Copy link to clipboard 
Print this post

Andrew,
I would buy the cheapest router I can find - $75 from Jaycar.
You need a DHCP server which routers have. Connect the pico and your PC to it and you are off and running. PC can be WiFi or Ethernet.
As Phil says, you don't need internet access - unless you store support files 'in the wild'.

I would open up one of my picos for you to play with but there are too many tools on the pico now and it would be a security rick. Even obscure port numbers soon get scanned these days.

Jim
VK7JH
MMedit   MMBasic Help
 
     Page 3 of 5    
Print this page
© JAQ Software 2024