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 : Using Capacitive Touch Panel with Pico
Author | Message | ||||
apalert Newbie Joined: 06/07/2023 Location: AustraliaPosts: 17 |
Wanting to update a Pico/MMBasic project to use Capacitive Touch Screen and wondering what my options are. So far it seems coding with Arduino might be my best bet. However I have zero Arduino experience. Are there any suggestions for an easier way? |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 917 |
I am also a fan of the capacitive touchscreen due to the resilience. I keep meaning to ask opinions about BBC BASIC under RISC OS on the Raspberry Pi. I believe that at least Volhout has it on the RPi Zero. Arduino: I prefer interpreted languages but I used RandomNerd tutorials to get me going on the ESP32 which I am using as a PicoMite peripheral. It's actually quite straightforward as there is such an abundance of existing code out there. When I need to add my own code, I type small snippets in BASIC and dump it into ChatGPT or Copilot and request a conversion to Arduino Works like a champ. Thus far, I am only using the ESP32 for Bluetooth and all I do is redirect the Bluetooth data to a UART. This is the easiest BT adapter that I've ever used. I guess that the same could be done with touchscreen coordinates(?) Edited 2024-12-14 15:44 by PhenixRising |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4066 |
I suspect RISC OS is a dead end, what remains of their community seems incapable of porting it to 64-bit so it may not be long until it only exists in emulation and on legacy hardware. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9283 |
Capacitive touch are typically I2C devices so there is nothing too difficult in coding them in MMBasic. If there was a readily available screen with capacitive touch (like the resistive ubiquitous ILI9341/X2046) then I would include support in the firmware but I don't know of a suitable, sensibly priced, candidate |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 917 |
I don't get that impression Authors RISC OS London Show |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2838 |
Confirming I have successfully interfaced small capacitive touch-screens to a Pico. As Peter says, reasonably simple to implement I2C code to return x and y coordinates of a single touch point. I have not explored multi-touch - but data sheets do go into how to do it …. For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4066 |
My information is all 2nd or 3rd hand (I'm a member of a small in-person RISC OS user group though only for Acorn nostalgia and kicks and giggles, I'm not a real user) but I believe those are all 32-bit builds and (excluding emulation) RISC OS cannot be made to run on hardware which only has 64-bit ARM support (Pi 5, and presumably other future non-uC hardware), I also don't believe they have a RISC-V port either, presumably their problem is that a significant proportion of the O/S is written in 32-bit ARM assembler. YMMV, Tom Edited 2024-12-14 22:43 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 917 |
Ah-ha...Wondered why no mention of RPi5 Exchanged a few emails with Richard Russell this past week. He has been bit-banging GPIO with BBC BASIC on the RPi5 (not RISC OS) but I am more interested in HMI and leaving the I/O to the PicoMite. |
||||
apalert Newbie Joined: 06/07/2023 Location: AustraliaPosts: 17 |
Applied some research to this Peter, looking at East Rising LCD panels from Buydisplay.com in the 2.4" - 3.5" range that have Capacitive Touch option as well as LCD controllers compatible with MMBasic. Seems they commonly use FocalTech touch controllers FT6236/FT6336 and FT6206. Results tabulated below: |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4343 |
Phenix, I have run BBC Basic V on the pi zero. At the 50'th birthday of Basic (2014) there was a "pico" release of BBC Basic on the zero, so it would boot like a 80's computer to commandline. The Basic was fast. However, the "pico" BBC Basic image was removed, and when asking the authors, they said it was for the celebration only. Use the RISCOS image, it has the same basic built in. It will run on a pi zero. I tried it, but apparently my body is very much used to mouse and keyboard operation of the post 2000's. In RISCOS many things go different. I tried, but kept making mistakes, and finally gave up. I know it took me hours (with searching the internet in hard to find help how to use RISCOS) before I had the BM1-8.bas benchmark ported and running. RISCOS is older, has it's own way of doing things, that I am not used to. And (as Tom said) it may have no long term path. What if you can only buy a Pi5 in 2 years.. or only a Pi6 ?? My bet for HMI would be to go android or linux. On linux, I think Tom's MMB4L-0.7 (yet to come) will fill the niche. The 0.6 version was very reliable in serial communication, so for automation it would be great. It only lacks the graphical options to make a nice UI. Volhout Edited 2024-12-16 17:11 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 917 |
Hi Harm, I think I'll just stick with Android. I was just getting a bit frustrated with Google constantly applying more and more restrictions but I have found workarounds so I was worrying for nothing. My goal is for my end-users to never be stuck for a spare part and the vast majority of machine-re-control projects that I get are because of a dead and obsolete user-interface. My Android HMI runs on tablets, phones and industrial panel PC's so I need to quit worrying. PicoMites, opto-couplers, etc., are cheap enough that I provide spares as part of the package even though the probability of failure is low. I dub my concept "MTTR-ZH" (mean time to repair, zero hours) Richard Russell commented that the BBC BASIC included with RISC OS is "pretty much the way Sophie Wilson wrote it, originally". Seems to me that it has moved-on quite a bit but what do I know. Richard's version runs on 64-bit but I don't see my users easily replacing a RPi5 in the event of a failure. Yeah, I'll stick with Android; install the app, pair the Bluetooth and we're good to go |
||||
Print this page |