Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 11:26 06 May 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 alphas - It had to be done

     Page 4 of 5    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5742
Posted: 08:50am 02 Apr 2023
Copy link to clipboard 
Print this post

But you can have 8 wired controllers on a single I2C bus if you put a MCP23008 in each.   :)
Mick

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

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 10:55am 02 Apr 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  But you can have 8 wired controllers on a single I2C bus if you put a MCP23008 in each.   :)


Huh?
I really don't get that at all
I was talking about making it bluetooth wireless so you don't have to have port expanders or wires to every controller
Edited 2023-04-02 20:58 by lew247
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 11:02am 02 Apr 2023
Copy link to clipboard 
Print this post

I will not be implementing bluetooth - too big to work with wifi and in any case still in beta
Edited 2023-04-02 21:02 by matherp
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5742
Posted: 12:38pm 02 Apr 2023
Copy link to clipboard 
Print this post

  Quote  how about adding Bluetooth Controller support instead of only having one wired controller?
You could then play multiplayer with friends

But we can already have two wired SNES controllers - not one. I was simply pointing out that the limit isn't one. :) The PicoGAME has two ports that can be Atari joysticks or SNES controllers.

My comment about I2C merely points out that even two isn't the limit if you'll accept wires, and it's very cheap to do.
Mick

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3850
Posted: 12:48pm 02 Apr 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  But we can already have two wired SNES controllers - not one.


Though good luck finding a clone SNES controller that (a) is actually a SNES controller (and not a NES controller in a SNES shell) and (b) works at 3.3V. I'm fairly sure the originals would work though you'd have to replace their proprietary plugs with DB9 - you probably shouldn't do that butchery though.

Compatible clone NES controllers are easier to find, but still a bit of a crapshoot. I just received another one from AliExpress which was advertised as cosmetically different to any I had previously tested. When it arrived it was not the one in the photo but identical to a working one that I already have (and which I have never seen advertised with a correct photo) - though I have yet to test this latest .

  Mixtel90 said  My comment about I2C merely points out that even two isn't the limit if you'll accept wires, and it's very cheap to do.


Even using the NES not-SPI protocol I believe you only need 3 I/O pins (latch, clock, data) for the first controller and one extra pin (data) for each subsequent controller.

  matherp said  I will not be implementing bluetooth - too big to work with wifi and in any case still in beta


I look forward to enjoying it soon then .

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 01:02pm 02 Apr 2023
Copy link to clipboard 
Print this post

  Quote  I look forward to enjoying it soon then


Not in this case. I've looked at it and incorporating it would completely compromise MMBasic
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3850
Posted: 01:04pm 02 Apr 2023
Copy link to clipboard 
Print this post

  matherp said  
  Quote  I look forward to enjoying it soon then


Not in this case. I've looked at it and incorporating it would completely compromise MMBasic


I was joking Peter, but you have to admit you have form.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5742
Posted: 02:08pm 02 Apr 2023
Copy link to clipboard 
Print this post

NES hardware controllers:
latch, clock
data 1-8 for 8 controllers
= 10 pins

I2C hardware controllers:
sda
scl
number of controllers is limited by the number of possible addresses. The MCP chip has 8.
= 2 pins

I rest my case m'lud. :)

I have a little project to play with. I have onee of those cheap analogue joysticks and the idea is to use it with a quad comparator to produce Up, Down, Left and Right digital signals that can be converted to I2C. As these joysticks are less than 2 UKP and are self-centering and include a switch suitable for menu/start or something it might make an interesting controller. if you add a fire button. I'm just a little uncertain about the lack of tactile feedback, but sensitivity is easily adjustable by changing a single resistor (could be a preset) which adjusts the dead band.
Mick

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3850
Posted: 02:15pm 02 Apr 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  I rest my case m'lud. :)


If only I could find a 100% reliable source of NES controllers I'd risk a day in court with you; given that you will have to custom build / hack your controllers .

  Mixtel90 said  If you add a fire button.


If you are building custom controllers for general purpose "8-bit" gaming it really is worth having 4 buttons (A, B, Start, Select). The Japanese designers of the NES knew what they were doing; that is enough to play Elite on the NES without reaching for a keyboard, unlike the 1 or 2 buttons joysticks for the 8-bit computers.

Best wishes,

Tom
Edited 2023-04-03 00:16 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5742
Posted: 02:26pm 02 Apr 2023
Copy link to clipboard 
Print this post

That's fine. You have 8 bits available. Four direction, one joystick switch (Start) and three buttons. :)

The most difficult thing is probably getting it to mount in a case. The depth of the joystick is quite a lot more than the buttons so you end up with two PCBs or a split level one. I've not figured that out yet. You *can* buy the bare joystick module separately and you *can* find custom-made knobs for them but the cost is way more than a ready built module on a PCB.
Edited 2023-04-03 00:30 by Mixtel90
Mick

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

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 03:54pm 02 Apr 2023
Copy link to clipboard 
Print this post

And if someone used the HC-42 BLE5.0 module (very similar to HC-12 but bleutooth

you could have any or all these controllers working
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5742
Posted: 04:13pm 02 Apr 2023
Copy link to clipboard 
Print this post

Interesting module. I've not spotted how you would work with one master and multiple slaves though. If that could be done it might be ideal as it runs in COM mode. You don't need bluetooth support in MMBasic then.
Mick

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

Joined: 28/02/2023
Location: Germany
Posts: 73
Posted: 06:53pm 02 Apr 2023
Copy link to clipboard 
Print this post

  matherp said  I will not be implementing bluetooth - too big to work with wifi and in any case still in beta


Hm

The latency over Wifi is remarkably high. I think many would prefer Classic Bluetooth instead of Wifi. Especially in conjunction with wearable sensors and smartphones.
It would be nice to hear: "Bluetooth maybe later but without WiFi, because no space in memory."
Personally, my focus is on wearable sensors for medical accelerometers.
ESP32 and Pico with additional BT module build too big.

Gregor
Edited 2023-04-03 04:57 by aFox
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 07:25pm 02 Apr 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  Interesting module. I've not spotted how you would work with one master and multiple slaves though. If that could be done it might be ideal as it runs in COM mode. You don't need bluetooth support in MMBasic then.

I don't know if it will work with multiple slaves
but I have the Datasheet
Extract from it

HC-42 english datasheet.pdf
Edited 2023-04-03 05:27 by lew247
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5742
Posted: 07:46pm 02 Apr 2023
Copy link to clipboard 
Print this post

It may as well be in Chinese for me. I know nothing of Bluetooth, I just have some stuff that uses it. :)

Unless it has multiple slaves there's no point. You *can* include the device address in the protocol, but you are going to have to scan every controller in each time period (could be during frame flyback, but there's a lot of other stuff has to be done then too). Having a protocol that includes device addresses is more data to send, even if there are no ACK signals or error handling.
Mick

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

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5742
Posted: 02:10pm 03 Apr 2023
Copy link to clipboard 
Print this post

I can fit my I2C design into one of my favourite 90mm x 70mm x 28mm cases, unless I've missed something. One main PCB, the joystick mounts on 2mm washers and the buttons PCB on 3off 6mm spacers. I've done a bit of calculation and a preset pot allows a decent sensitivity adjustment. Just wondering whether to use RJ11 4-pin connectors (the sort used for telephones). A socket will fit and it makes leads easy to change. It does mean slotting out the side of the box though. Unless I run an interrupt wire it only needs 4 wires.
Edited 2023-04-04 00:16 by Mixtel90
Mick

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

Joined: 18/10/2016
Location: Australia
Posts: 842
Posted: 11:27pm 08 Apr 2023
Copy link to clipboard 
Print this post

Hi,
I'm not sure if this is the correct thread (sorry if not).
Two quick questions if I may:

1) for the ESP8266 the "AT+CWLAP" sentence gave a list of available SSIDs. Is there an equivalent for the WebMite? (any way of gauging the signal strength of each?);
2) connecting pin #30 ("Run") to ground is suggested as a 'reset'. Is that OK for the Pico or does it risk any problems? Failing that, is the use of WATCHDOG better?

Cheers,

Andrew
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1799
Posted: 11:37pm 08 Apr 2023
Copy link to clipboard 
Print this post

It seems "RUN" is just a shorter term for "Not Reset" - low to reset, high to run.

PS For stability connect RUN to 10k to 3V3 and a 10nF to 100nF from RUN to ground.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5914
Posted: 11:52pm 08 Apr 2023
Copy link to clipboard 
Print this post

  Quote  1) for the ESP8266 the "AT+CWLAP" sentence gave a list of available SSIDs. Is there an equivalent for the WebMite?

try
WEB SCAN

I think it is still the command. I haven't tried it recently.

Jim
VK7JH
MMedit   MMBasic Help
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 842
Posted: 12:35am 09 Apr 2023
Copy link to clipboard 
Print this post

Phil - Thanks I'll give it a try.

Jim - thanks too. It works both from the console and within code. It is described on the first page of this thread (which I've read many times - sorry).

Back to the chocolate and buns.

Andrew
 
     Page 4 of 5    
Print this page
© JAQ Software 2024