123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|93|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Hardware and Technology -> Building a Touchable Keyboard

Page : 1 2 3 Prev 4 5 Next
Sun, 22 Sep 2019, 09:55
spinal
It would probably be very hard to fit something 'DIY' in there, I imagine that the insides are all full up with it's own insides. It did cross my mind initially but I ruled it out because of the presumed space issues, also I wanted a C64 keyboard layout, which, like most 80's 8bits, was unique.

-=-=-
Check out my excellent homepage!
Sat, 05 Mar 2022, 09:27
spinal
If only I had posted the full code for this, I'd be able to continue where I left off!

-=-=-
Check out my excellent homepage!
Sat, 05 Mar 2022, 09:35
Jayenkai
Oh no. What happened?
Sat, 05 Mar 2022, 09:45
spinal
Found I had a spare screen that I forgot about,
hunting through my hard drives, can't find the code.

-=-=-
Check out my excellent homepage!
Sat, 05 Mar 2022, 10:00
Jayenkai
D'oh...
Sat, 05 Mar 2022, 10:08
spinal
Found something!
However it compiles to use more than 100% space, that's not good. I will assume the gfx libraries in arduino have bloated over the years, because I'm sure this used to work

-=-=-
Check out my excellent homepage!
Tue, 08 Mar 2022, 09:19
spinal
Raspberry Pi Pico to the rescue!



No idea if there is software for the touch screen or not, but I asume there will be keyboard code somewhere.

-=-=-
Check out my excellent homepage!
Tue, 08 Mar 2022, 09:40
Jayenkai
Oooooh!
Tue, 08 Mar 2022, 09:55
spinal
Some of those images dont work and I have no idea what format they're supposed to be, I assume 1bpp but I might be wrong. Should have backed up the code somewhere.

|edit| I can actully start over with the gfx as I'm only using 3% of the flash space instead of 106% that I was on the arduino.

-=-=-
Check out my excellent homepage!
Sat, 19 Mar 2022, 12:19
spinal
Should have took a photo of the wiring before pullint it apart, it wont work againnow

-=-=-
Check out my excellent homepage!
Sat, 19 Mar 2022, 13:18
Jayenkai
Oh no!!!
Mon, 21 Mar 2022, 07:47
spinal
OK, before going any further, here is the current working code, It has screen, touch and SD card working on the raspberry pi pico through arduino libraries.

The following code first blanks the screen then waits for a serial window to be opened on the computer. Once the serial window is open, it dumps a directory listing through the serial then draws a C64 keyboard on the screen. If you touch the screen, it checks the touch point agains the current min/max points for scalling, if it's outside that range it simply extends the range, result is that the more you touch the screen, the more accurate the positioning is. It also draws a key at the touch point.







Next step: make it do something useful...... or not.

-=-=-
Check out my excellent homepage!
Mon, 21 Mar 2022, 08:04
Jayenkai
Cool!
Now, will the RPico also be able to do the C64 emu, or would you need perhaps a second Full-Pi hooked up to it for that?
How powerful IS the Pico?

-=-=-
''Load, Next List!''
Mon, 21 Mar 2022, 08:17
spinal
I've seen a Pico do c64 emu, not sure if it can do both though. I was originally going to use a pi zero for the emu, but can't get that working as all the software is outdated and can't be updated.

-=-=-
Check out my excellent homepage!
Tue, 22 Mar 2022, 03:23
cyangames
Can you write to the pico from windows software? might have a look into it, I should up my level on programming in this area, can you recommend any guides for beginners in this field spinal? You make some awesome projects.

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Tue, 22 Mar 2022, 05:05
spinal
There is at lease one way to setup the arduino ide to use the rpi pico, can't remember how that went though but once done, regular arduino code will run on it, but it takes a lot longer to compile than for other arduinos.
As for guides, you may have noticed that I don't actually know what I'm doing, I just google code snippets here and there and glue it all together.

-=-=-
Check out my excellent homepage!
Tue, 22 Mar 2022, 05:26
cyangames
Okies, will do some research tonight then pico boards are dirt cheap also which is handy!

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Sun, 27 Mar 2022, 11:23
spinal


OK, with the above diagram, I now have the same setup as before, but with a larger screen. This on is 480x320, giving plenty of pixels to draw any size keyboard I want.

It uses whatever the Arduino Pico library is called as well as tft_eSPI for the screen control (both display and touch), and I *think* the standard SD card library.
You can see from the diagram, the SD card uses the hardwar SPI pins, and the screen is done in software (I think).

-=-=-
Check out my excellent homepage!
Thu, 31 Mar 2022, 04:24
spinal
Hmmm, need to figure what is wrong with the pixel format 😟



-=-=-
Check out my excellent homepage!
Thu, 31 Mar 2022, 04:32
Jayenkai
Looks like something the Mythbusters would use for testing speeds of things!

-=-=-
''Load, Next List!''
Thu, 31 Mar 2022, 13:47
spinal
The pixels are being sent as bgr565, Regular BBBBBGGG GGGRRRRR. I wonder if they are wrong ended?

-=-=-
Check out my excellent homepage!
Fri, 01 Apr 2022, 12:50
spinal
OK, The following code increases the RGB value for every single pixel in a 256x256 grid.



Which gives something like the following (although on the actual screen there seems to be more red, but that might be my old-man eyes squinting at a tiny screen...



The first line goes from 0 to 255, then the second from 256 to 511 etc.
As it loops through the green 16 times, I will assume that the right most 4bits are Green, next to those, the red seems to take 16 steps, so that should be 4bits and the blue seems to repeat every 32 pixels down. Giving the format of BBBBBRRRRGGGG, that cant be right, thats only 13bit and this grid uses the full 16bit range.... Literally every single possible 16bit number is there.

|edit| Ah, probably 844 (not 544), still..... never heard of that format, even swapping the bytes around, that's RGB844, nothing I've evers seen that I'm aware off. I'll do some tests and see if that's right.

-=-=-
Check out my excellent homepage!
Fri, 01 Apr 2022, 13:35
Jayenkai
Pretty colours!
Fri, 01 Apr 2022, 14:25
spinal
Got it working now, it was RGB565 after all, I have accidentally added an extra 0 onto the trasmition speed, so was sending the data too fast. Result was that every <insert number here> bit got dropped. Running it a little slower works perfectly

-=-=-
Check out my excellent homepage!
Fri, 01 Apr 2022, 16:16
rockford
\o/ Yay for human error and not something you can't fix!
Mon, 04 Apr 2022, 08:59
spinal
OK, this is working so far...





-=-=-
Check out my excellent homepage!
Page : 1 2 3 Prev 4 5 Next