Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:38 06 Jun 2026 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 : Just a side project

     Page 2 of 2    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8877
Posted: 08:56am 03 Jun 2026
Copy link to clipboard 
Print this post

He has my sympathy. :( The cheap Ebike batteries, especially the cheap clones from China, are usually built down to a price. Cheap cells and skimping on the protection then coupled them with chargers that have serious electrical issues. No wonder they catch fire really.
This video shows how bad some of the cells are...
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2069
Posted: 05:11am 04 Jun 2026
Copy link to clipboard 
Print this post

ok been working with Claude and got TFTP working nicely to upload to the webmite, now I have camera.bas and index.html in A: drive and doing a run I'm getting the same error.

Now the CAMERA OPEN GP8, GP9, GP10, GP!!, GP14, GP0 keeps getting the wrong display type

> run
[28] Camera OPEN GP8, GP9, GP10, GP11, GP14, GP0
Error : Invalid display type


EVERY pico version I have tried this option has said the same thing now claude has said

Can CAMERA CHANGE work without an LCD configured?

Is there a workaround for the "Invalid display type" error without a physical display?


So the big question is the camera command only suited to a LCD which must be wired up for this to work.

claude has made the camera.bas and a index.html files so just need to get over this Invalid Display type.

I got everything else working but with the rain today gotta keep taking the breadboard away from the door so the wifi signal is lost.


Regards Bryan
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3268
Posted: 05:38am 04 Jun 2026
Copy link to clipboard 
Print this post

Have you tried the Virtual LCD Panel? Peter added it to the firmware so WebMites could process images without an attached display.
  Quote  OPTION LCDPANEL VIRTUAL_C
or
OPTION LCDPANEL VIRTUAL_M

NOT VGA OR HDMI VERSIONS
Configures an LCD panel on versions that accept a connected LCD.
Configures a virtual LCD panel without a physically connected panel.
VIRTUAL _C = Colour, 4bit, 320 x 240
VIRTUAL _M = Monochrome, 640 x 480
Using this feature a program can draw graphical images on this virtual panel and then save them as a BMP file. Useful for creating a graphic image for export without an attached display
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2069
Posted: 06:02am 04 Jun 2026
Copy link to clipboard 
Print this post

> run
[28] CAMERA OPEN GP8, GP9,GP10, GP11, GP14, GP0
Error : Unknown command
> option list
WebMite MMBasic Version 5.08.00
OPTION CPUSPEED  252000 'KHz
OPTION LCDPANEL VIRTUAL_C
OPTION WIFI Home, *********, PICOE6614104032


Now for V5.8 which I'm running

> run
[28] CAMERA OPEN 8, 9,10, 11, 14, 0
Error : Unknown command


So honestly does this confirm the webmite can't run the 0V7670 camera
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3268
Posted: 06:41am 04 Jun 2026
Copy link to clipboard 
Print this post

It does look that way.
Type LIST COMMANDS on the WebMite.
If it isn't in that list then it probably isn't there at all.
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2069
Posted: 06:49am 04 Jun 2026
Copy link to clipboard 
Print this post

Ok I have loaded up V6.02 and the fun continues as now MCCC is hanging and teraterm was having a hard time connecting but it did connect for this

> edit
PC=000026EC LR=10077821


Now this is where MCCC has fallen down

> run
[26] CPU 288
Error : Invalid syntax
PC=
16:07:40 Port: COM14 removed

Disconnected

16:07:40 Port: COM14 inserted

Connected to COM14 at 115200
PICOE6614104032 connecting to WiFi...
Connected 192.168.1.29
>
> edit
PC=


Now I did do a reboot as MCCC was hanging up so much but the problem is still the same.

this is with a fresh reboot of the webmite

WebMite MMBasic RP2040 Edition V6.02.01
Copyright 2011-2026 Geoff Graham
Copyright 2016-2026 Peter Mather

PICOE6614104032 connecting to WiFi...
Connected 192.168.1.29
> files
A:/
  <DIR>  .
  <DIR>  ..
00:00 01-01-2024          4  bootcount
00:00 01-01-2024       2651  camera.bas
00:00 01-01-2024       1186  index.html
2 directories, 3 files, 569344 bytes free
> load "A:/camera.bas"
> edit
PC=


So not only am I having fun with this but it does look I broke MCCC   with my tinkering
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2069
Posted: 06:55am 04 Jun 2026
Copy link to clipboard 
Print this post

here is the list commands

> list commands
*/             .end program   .label         .line          .program
.side set      .wrap          .wrap target   /*             ADC
Arc            Array Add      Array Insert   Array Set      Array Slice
Autosave       Backlight      Bezier         Bit(           Bitstream
Blit           Blit Memory    Box            Byte(          Call
Camera         Case           Case Else      Cat            Chain
Chdir          Circle         Clear          Close          CLS
Color          Colour         Colour Map     Configure      Const
Continue       Copy           CPU            CSub           Data
Date$          DefineFont     Device         Dim            Do
Drive          Edit  


So the camera command IS there

Now silly me forgot to load the I2C pins so did that and this is the result


> option list
WebMite MMBasic RP2040 Edition V6.02.01
OPTION SYSTEM I2C GP12,GP13
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 252000
OPTION LCDPANEL VIRTUAL_C
OPTION WIFI Home, *********, PICOE6614104032
OPTION TELNET CONSOLE ON
> load "A:/camera.bas"
> edit
PC=


So MCCC is still hanging on that same problem
Edited 2026-06-04 17:05 by Bryan1
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2069
Posted: 07:12am 04 Jun 2026
Copy link to clipboard 
Print this post

Well I haven't had chance to try out claudes code on the webmite today so here is what it made for me


camera.zip


index.zip

Now looking at the index.html file it's all setup to receive the image and update every 60 seconds now my idea when we got over this step everything else could be done.

Regards Bryan
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3268
Posted: 07:21am 04 Jun 2026
Copy link to clipboard 
Print this post

Found the V6.02.01 manual.
  Quote  CAMERA
NOT VGA OR HDMI VERSIONS
Command supporting the OV7670 camera module.
CAMERA OPEN XLKpin, PLKpin, HSpin, VSCpin, RETpin, D0pin

This initialises the camera, It outputs a 12MHz clock on XLK (PWM) and checks that it is correctly receiving signals on PLK, VS, and HS. The camera is set to a resolution of 160x120 (QQVGA) which is the maximum achievable within the limits of the available memory.
Enable OPTION SYSTEM I2C in the PicoMite firmware and wire SCL and SDA to the relevant pins (may be labelled SIOC and SIOD on the camera module). These connections must have a pullup to 3.3V - 2K7 recommended)
Other pins are wired as per the OPEN command. (NB: VS may be labelled VSYNC, HS may be labelled HREF, PLK may be labelled PCLK, RET may be labelled RESET and XLK may be XCLK on your module)
D0pin defines the start of a range of 8 contiguous pins (eg,GP0 - GP7).

CAMERA CAPTURE [scale, [x , y]]
This captures a picture from the camera (RGB565) and displays it on an LCD screen. An SPI LCD must be connected and enabled in order for the command to work. (ILI9341 and ST7789_320 recommended).
Scale defaults to 1 and x,y each to 0
By default a 160x120 image is output on the LCD with the top left at 0,0 on the LCD. Setting scale to 2 will fill a 320x240 display with the image. Setting the x and y parameters will offset the top left of the image on the LCD.
Update rate in a continuous loop is 7FPS onto the display at 1:1 scale and 5FPS scaled to 320x240.
Assuming the display has MISO wired it is then possible to save the image to disk using the SAVE IMAGE command.
CAMERA CLOSE Closes the camera subsystem and frees up all the pins allocated in the OPEN command.

CAMERA CHANGE
image%(),change! [,scale [,x ,y]]
The camera firmware is also able to detect motion in the camera's field of view using the command. It does this by operating the camera in YUV mode rather than RGB. This has the advantage that the intensity information and colour information are separated and just one byte is needed for a 256-level greyscale image which is ideal fer detecting movement.
image% is an array of size 160x120 bytes (DIM image%(160,120/8-1)
On calling the command it holds a packed 8-bit greyscale image.
The change! variable returns the percentage the image has changed from the previous time the command was called.
Optionally if "scale" is set then the image delta is output to the screen i.e. the difference between the previous image and this one. As in the CAPTURE command the delta image can be scaled and positioned as required. If the scale parameter is omitted then the LCD is not updated by this command.

CAMERA TEST tnum
Enables or disables a test signal from the camera. tnum=2 generates colourbars and tnum=0 sets back to the visual input.

CAMERA REGISTER reg%, data%
Sets the register "reg%" in the camera to the value "data%". When used the command will report to the console the previous value and automatically confirms that the new value has been set as requested. The colour rendition of the camera as initialised is reasonable but could probably be improved further by tuning the various camera registers.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11435
Posted: 07:22am 04 Jun 2026
Copy link to clipboard 
Print this post

The camera command is available on the webmite. I haven't tested it recently but no reason it wouldn't work. However, it might be better to refer to the manual rather than claude.
From the manual
  Quote  Command supporting the OV7670 camera module.
For an uncorrupted image the CPU speed must be 288MHz or more for the
RP2040 and 200 MHz or more for the RP2350.
This initialises the camera, It outputs a 12MHz clock on XLK (PWM) and
checks that it is correctly receiving signals on PLK, VS, and HS. The camera is
set to a resolution of 160x120 (QQVGA) which is the maximum achievable
within the limits of the available memory.
Enable OPTION SYSTEM I2C in the PicoMite firmware and wire SCL and
SDA to the relevant pins (may be labelled SIOC and SIOD on the camera
module). These connections must have a pullup to 3.3V - 2K7 recommended)
Other pins are wired as per the OPEN command. (NB: VS may be labelled
VSYNC, HS may be labelled HREF, PLK may be labelled PCLK, RET may
be labelled RESET and XLK may be XCLK on your module)
D0pin defines the start of a range of 8 contiguous pins (eg,GP0 - GP7).
This captures a picture from the camera (RGB565) and displays it on an LCD
screen. An SPI LCD must be connected and enabled in order for the command
to work. (ILI9341 and ST7789_320 recommended).

Edited 2026-06-04 17:23 by matherp
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2069
Posted: 07:38am 04 Jun 2026
Copy link to clipboard 
Print this post

Yes all day in every version I have tried setting 280000 only to get and error saying 252000 is the max, I did try the 28000

> option cpuspeed 288000
Error : 288000 is invalid (valid is 126000 to 252000)
PC=


Now I'm wondering as the pullups weren't done on the I2C lines and will soon be is that the cause of my problems today.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5902
Posted: 07:49am 04 Jun 2026
Copy link to clipboard 
Print this post

Bryan,

With recent improvements in speed, I have succesfully run the camera on an RP2040 at 200MHz, and 252MHz is absolutely crisp. I did NOT test this on a Webmite (Pico W), but on a RP2040 built in a Game*Mite.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2069
Posted: 08:26am 04 Jun 2026
Copy link to clipboard 
Print this post

Ok going off Peter's manual post it does say IT MUST be connected to a LCD, now with the option lcdpanel virtual_C command I thought it would of gotten over this but it is close to the end of the day of me trying as going

WebMite MMBasic RP2040 Edition V6.02.01
Copyright 2011-2026 Geoff Graham
Copyright 2016-2026 Peter Mather

PICOE6614104032 connecting to WiFi...
Connected 192.168.x.xx
>
> load "A:/camera.bas"
> edit


is hanging MCCC where earlier in the day it in both teraterm and MCCC opened the editor where now teraterm closes the connection after I loaded the file after typing edit.
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2069
Posted: 10:00am 04 Jun 2026
Copy link to clipboard 
Print this post

Well as my day's work was quashed with my errors yet again where I have used claude if there is code from yesterday where the 0V7670 camera with a webmite could you guy's please share.

Now as I have my daughter's boyfriend coming around to nuke my house computer as it does have that trojan on I did want to impress him with a working camera off my farm wifi using MMBasic as he does have a 3D printer to make the cases for this project.

The idea for these camera's is what seeing kangaroo's and snakes after they wake up after winter and I have seen a few times brown snakes that are white after the winter sleep come out.

Also it would be nice to see that huge black snake thats comes over but is never seen

So most times the camera's  will show the same image when a capture takes place then when the flash runs out an email is sent to so one can attend or a message on bluetooth that seemed to pass me by.

Now as I have 2 off 2040W's so an order of these new webmite 2W's should be on the cards and looking on ali whats the best price of these chips as I should upgrade to the times

Regards Bryan
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2069
Posted: 06:38am 05 Jun 2026
Copy link to clipboard 
Print this post

Well today more fun and doing everything by the manual where yesterday the webmite connected easily to my wifi yet today no luck at all. So I set it up using the hotspot on my mobile which was a bad idea as trying TPFP wouldn't work and teraterm just won't connect at all.

Now for the first time I found the MCCC file manager   so tried uploading doing that

Processing file: C:\Users\Bryan\Documents\index.html

>
2 directories, 1 file, 577536 bytes free
Blocks: 10
Reverting to XMODEM
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Transfer failed!
Finished


Sending 1 files

Processing file: C:\Users\Bryan\Documents\camera.bas

Blocks: 21
Transfer failed!
Finished


Now this was when the webmite was off line so hooked it back up to my mobile so the webmite was online and got the same problem with the file transfer now as I did enable the TCP server could this be the problem.

Connected to COM14 at 115200
failed to connect.
> option list
WebMite MMBasic RP2040 Edition V6.02.01
OPTION SYSTEM I2C GP12,GP13
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 252000
OPTION LCDPANEL VIRTUAL_C
OPTION WIFI Hotspot, ********, PICOE6614104032
OPTION TCP SERVER PORT 80
OPTION TELNET CONSOLE ON
> web connect "Hotspot", "*******"
PICOE6614104032 connecting to WiFi...
failed to connect.


But on the mobile it is clearly showing the pico is connected as PICOE6614104032 and 0.02mB transferred

So with TFTP down, teraterm won't connect and Xmodem refuses don't know what I've done wrong but can't upload the files to the webmite
Edited 2026-06-05 16:40 by Bryan1
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2069
Posted: 06:47am 05 Jun 2026
Copy link to clipboard 
Print this post

Maximite Control Centre
Build date: 2026/01/26
  Data server on port 50900 started
Control server on port 50899 started
started

16:02:20 Port: COM14 inserted

failed!
Check port then try again
Connected to COM14 at 115200
failed to connect.
> option list
WebMite MMBasic RP2040 Edition V6.02.01
OPTION SYSTEM I2C GP12,GP13
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 252000
OPTION LCDPANEL VIRTUAL_C
OPTION WIFI Hotspot, ********, PICOE6614104032
OPTION TCP SERVER PORT 80
OPTION TELNET CONSOLE ON
> web connect "Hotspot", "*******"
PICOE6614104032 connecting to WiFi...
failed to connect.
> web connect "Hotspot", "*******"
PICOE6614104032 connecting to WiFi...
failed to connect.
>
16:11:00 Port: COM14 removed

Disconnected

16:11:06 Port: COM14 inserted

Connected to COM14 at 115200
WebMite MMBasic RP2040 Edition V6.02.01
Copyright 2011-2026 Geoff Graham
Copyright 2016-2026 Peter Mather

PICOE6614104032 connecting to WiFi...
Connected 10.164.39.40
Starting TCP server at 10.164.39.40 on port 80
> 2 directories, 1 file, 577536 bytes free
Sending 1 files

>
Processing file: C:\Users\Bryan\Documents\camera.bas

>
2 directories, 1 file, 577536 bytes free
Blocks: 21
Reverting to XMODEM

16:11:53 Port: COM14 removed

Disconnected

16:11:53 Port: COM14 removed

Disconnected

16:11:53 Port: COM14 removed


16:11:54 Port: COM14 inserted

Connected to COM14 at 115200

16:11:54 Port: COM14 inserted




Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Responce not found at block 1
Transfer failed!
Finished
2 directories, 1 file, 577536 bytes free

>


This was the result trying again now as MCCC did a reboot after I started the upload the webmite was taking time to connect so if I stopped the TCP server could this be the cause of my problem

Now just tried a TFTP with a fresh connection where the webmite found the wifi

Connected to COM14 at 115200
Connected 10.164.39.40
Starting TCP server at 10.164.39.40 on port 80
>


C:\Users\Bryan>TFTP -i 10.164.39.40 PUT C:\Users\Bryan\Documents\camera.bas camera.bas
Connect request failed


Yesterday when a TFTP started MCCC saw it and showed the output but today nothing comes up.
Edited 2026-06-05 17:01 by Bryan1
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 508
Posted: 07:11am 05 Jun 2026
Copy link to clipboard 
Print this post

Bryan,

if you happen to use a Fritzbox as WIFI-router you may find that connections from the WebMite to the router olny succeeds every 2nd time and this is repeatable. Dunno if other routers have the same or a similar behaviour. So simply a CPU RESTART after a failed connect solves this situation here.

With the V6.03.RC7 versions Peter has introduced an additional parameter on OPTION WIFI to specifiy the country you live in. This deals with frequency restrictions in WIFI based on local regulations. This means that the Pico then will not try to talk to the router on frequencies the router is not allowed to operate on, thus preventing connect failures.
This applies to all routers properly configured to your local regulations (they usually are) and not only to Fritzbox.

  Quote  
Improved error detection in WEB versions
Additional parameter in OPTION WIFI
If set correctly this will overcome issues with things like channel 12,13 usage by a router in countires where that is legal

OPTION WIFI ssid$, passwd$ [,name$] [, COUNTRY$]
OPTION WIFI ssid$, passwd$ [, name$] [, ipaddress$, mask$, gateway$] [, COUNTRY$]
Configures the firmware to automatically connect to a WiFi network on
restart.
'ssid$' is the name of the network and 'password$' is the access
password. Both are strings and if string constants are used they should
be quoted.
Optionally a name for the device can be specified 'name$', otherwise a
name is created from the unique device ID.
Optionally, a static IP address, IP mask, and gateway address can be
specified as 'ipaddress$', 'mask$', 'gateway$'.
Optionally a 2-letter ISO COUNTRY code 'COUNTRY$' can be specified to
set the WiFi regulatory domain. The default is "XX" (worldwide), which
restricts the device to the most conservative subset of channels and
transmit power. Setting the local COUNTRY code is recommended and is
often required to associate with EU routers (for example AVM Fritzbox)
which may use channels 12 or 13. If 'COUNTRY$' is omitted the
previously stored value is preserved; "" or "WW" both select
worldwide. The COUNTRY code is a regulatory setting and must match
the COUNTRY in which the device is operated.

Supported COUNTRY codes:
AU AT BE BR CA CH CL CN CO CZ DE DK EE ES FI FR GB GR HK HU IL IN
IS IT JP KE KR LI LT LU LV MT MX MY NG NL NO NZ PE PH PL PT SE SG
SI SK TH TR TW US ZA
XX or WW (worldwide, default)

eg. OPTION WIFI "mysid","mypassword","myPico","DE"

eg. OPTION WIFI "mysid","mypassword","myPico",
 "192.168.1.111","255.255.255.0","192.168.1.1","DE"


Maybe you should give it a try.

Gerald
Edited 2026-06-05 17:14 by ville56
                                                                 
73 de OE1HGA, Gerald
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026