geekhack
geekhack Projects => Making Stuff Together! => Topic started by: blueangel2323 on Mon, 30 November 2015, 19:49:15
-
Only $5... can these little computers be used as keyboard controllers? I know nothing about them...
-
https://geekhack.org/index.php?topic=77417.0
:p
-
Only $5... can these little computers be used as keyboard controllers? I know nothing about them...
It's probably too slow to be a keyboard controller. Linux is not an RTOS.
-
Too bad. Would be a killer price if it worked as a controller.
-
There's always the Real Time Linux Kernel patch, but I'd imagine this would keep up just fine even without it. The real issue is that the RPi doesn't support acting as a USB device, only a host. The chipset supports it, so it may just be an issue of driver support.
-
As bare metal is enough for keyboard controller. Zero does not have onboard USB hub controller, it's better than Pi A and B.
-
Boot time would be an annoying issue as well.
I kind of like Yoe's idea about using one to build a computer into a 60% keyboard, and just have power, USB and HDMI ports on the back of the keyboard case. Maybe I'll do that with my Smallfry JD40.
-
Ya it looks like the Zero is not cut out to be a keyboard controller, but I just came to realize a full Linux computer is cheaper than a Teensy...
-
So, looks like my previous posts were victim of
what might be considered over-zealous moderation. a database issue, apparently Meh.
Anyway, I've been involved in the Raspberry Pi project since well before the first cards hit the market. My main interest is "bare metal", rather than the Linux side of things (I was, if not the first, one of the first to get a non-linux multi-tasking executive up and running on the Pi). The Pi is a fantastic project despite its many flaws, and the zero is nothing short of miraculous - an (almost) fully-fledged computer for around the cost of a pint.
Anyway. The Pi is not a keyboard controller. Regardless of the other issues (power, boot time, etc), using it as such would only really be reasonable using bare metal code, and that would require full documentation of the Designware OTG core*; something that's not going to be forthcoming unless you're willing to buy a core license. And to do that, you need to be fabbing your own SoCs.
Use a microcontroller.
* Designware's OTG IP blocks are fairly common, on ARM, MIPS and SPARC at least. They're horribly buggy when used with Designware's "reference" code, and I've not yet seen a single piece of hardware that manages to use one of them in device or OTG mode.
-
My comment also got lost, in which I remind folks the McHck, which is a microcontroller, can be had for $5.
...if you buy in quantities of 50 or so.
Just need an enthused and tech-savvy GB organizer, and parts can be baked and shipped for the cost of a zero, but run TMK natively!
-
Boot time would be an annoying issue as well.
You can boot a complete Linux in less than three seconds, and probably less than half a second if you get rid of anything useless.
For example, this chess game on a raspi boots in under a single second :
https://www.raspberrypi.org/forums/viewtopic.php?f=72&t=48844
That being said, I'd say it's a lot of work to turn it into a keyboard controller (even more so when it can't run as a USB device) when we have perfectly fine and cheap solutions...
Being able to put a computer inside a keyboard, on the other hand, could be handy. I just hope they manage to keep the consumption low so that it can be powered over "normal" USB ports.
-
Boot time would be an annoying issue as well.
You can boot a complete Linux in less than three seconds, and probably less than half a second if you get rid of anything useless.
For example, this chess game on a raspi boots in under a single second :
https://www.raspberrypi.org/forums/viewtopic.php?f=72&t=48844
That being said, I'd say it's a lot of work to turn it into a keyboard controller (even more so when it can't run as a USB device) when we have perfectly fine and cheap solutions...
Being able to put a computer inside a keyboard, on the other hand, could be handy. I just hope they manage to keep the consumption low so that it can be powered over "normal" USB ports.
The previous Raspberry Pi boards were pretty closely based on the SoC reference designs, and since the SoCs are designed for low power usage the Raspberry Pi uses very little power. Now once you start adding Wi-Fi dongles and stuff, you need more juice. But the barebones device likely draws very, very little power.
-
Boot time would be an annoying issue as well.
You can boot a complete Linux in less than three seconds, and probably less than half a second if you get rid of anything useless.
For example, this chess game on a raspi boots in under a single second :
https://www.raspberrypi.org/forums/viewtopic.php?f=72&t=48844
And that's as fast as you'll get it. That chess program is bare metal, time to boot is limited by the time the GPU takes to boot (yo can't do anything about that), and throughput on the SD card interface in order to load your custom kernel. The gpu loads from the SD card in 1 bit mode. If you had a big kernel to load you might be able to speed things up by going 2 stage, with your "early boot" enabling 4 bit parallel loads from SD card. But the end result is always that boot time on the BCM2835 / ARM1176 equipped Pis is bounded at around 0.8s *minimum*, that's how long it takes to boot the stuff you can't improve yourself. Not sure about the ARM7 Pis, but I doubt it would be much faster.
-
The previous Raspberry Pi boards were pretty closely based on the SoC reference designs, and since the SoCs are designed for low power usage the Raspberry Pi uses very little power. Now once you start adding Wi-Fi dongles and stuff, you need more juice. But the barebones device likely draws very, very little power.
Not so little... "Normal" Pi draws about 300mA at idle without anything plugged in, and can sometimes go over 500mA when in heavy load with keyboard and video out.
It's a bit too much to be powered by a USB port.
And that's as fast as you'll get it.
Indeed... I'll trust you on the 0.8s, I haven't looked into details yet (no use for it). But surely a 0.8s or even a 1.5s boot should be sufficiently short for a keyboard ? I'm not sure you can even plug it and reach the keys as quickly (or at least in normal conditions).
-
Recently, Zero has USB device mode (USB Gadget Mode) on Raspbian, here the link:
https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=128899
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=129653
-
I ordered as many RP zero's as i could when i found them in stock ( like 6 or 7 ) now anywhere with any stock is limiting them to one per customer. I have a few projects i want to use them for using kodibuntu and some home automation stuff. Using one as a computer in a keyboard is a great idea.
-
And .... like usual ebay resellers are useing the lack of supply to make as much as they can.... A lot of them went out and desperately got every copy of the official pi magazine to make a few bucks on ebay by selling them separately. Cant blame the ones selling it, but you can get a low power computer like the bigger pi's. Or something even a bit better like a Banana pi for what people are paying.
-
I ordered as many RP zero's as i could when i found them in stock ( like 6 or 7 ) now anywhere with any stock is limiting them to one per customer. I have a few projects i want to use them for using kodibuntu and some home automation stuff. Using one as a computer in a keyboard is a great idea.
I kept checking my local book stores that sell MagPi but they only have the November issue. I then tried to go online to get like 10 of them to give to co-workers as stocking stuffer type gifts but no such luck. I still am not really sure what I would use one for. I don't have any projects in mind at this time but I think a $5 computer is pretty neat.
-
IF there was access to all documentation doing that would be easy peasy, just like the Bleagle Bone Black SoC has the dual PRU's that are real time programmable micro-controllers with DMA access to system RAM and peripherals(SPI, I2C, UART's, PWM, ADC's, IO, I2S, and more), the Broadcom SoC used in the RPi variations also have real time cores, I think I have read about it somewhere, but documentation is very sparse, and you also go bare metal, but you will always need a bootloader and the GPU blob, the GPU is the core the does the boot process and initializes the CPU so it can work, but its possible to treat the SoC as a run of the mill MCU, just bigger, faster and more complicated.
The wonders of NDA's :(
-
I ordered as many RP zero's as i could when i found them in stock ( like 6 or 7 ) now anywhere with any stock is limiting them to one per customer. I have a few projects i want to use them for using kodibuntu and some home automation stuff. Using one as a computer in a keyboard is a great idea.
I kept checking my local book stores that sell MagPi but they only have the November issue. I then tried to go online to get like 10 of them to give to co-workers as stocking stuffer type gifts but no such luck. I still am not really sure what I would use one for. I don't have any projects in mind at this time but I think a $5 computer is pretty neat.
I would probably give some of them away as christmas presents since there hard to get right now, but i probably wont get them for another 2 or so week's... Hopefully once the newness of a $5 computer wears off it will be easier to get them. For the price they are quite powerful, i've seen a few people trying to use them to stream media from a file server or pc to a TV and they acctually handle most 720p and 1080p video's decently. Though that isn't the most ideal use for them. I imagine there best use will be for thing's like integrating them into electronic's project's and stuff.