Hat of many things

I can imagine a tumble hat shaking itself off if used a lot :smile:.
A multi-hat sounds good to me though. Hopefully something will come of this idea.

1 Like

there some ways to secure a hat to the pokitto case with some lego parts, but your right, it might also rattle the pcb and lcd

No danger of that. 26 pin connector. Sticks like glue.

I think GPS might be more useful than the 9DOF. If nothing else, you get the current time out of it.

And no mention of a camera? Would power be an issue for that? But you could then create PokittoMon Go.

…my concern with the ‘hats’ is that it may only take a simple typo in the code to set an input or output the wrong way and potentially fry the hat or the Pokitto itself! it seems difficult to be able to design a hat to share with the community, because you can’t ever really safely assume the known state of the header pins on anybody else’s Pokitto?

Well frying something would only happen if you plug it in the wrong way.
Most of the hats probably have some chip so they be spi/i2c or something (i2c is nice for backwards compatibility with gamebuino modules)

Well, if the Pokitto’s buttons pull the pins directly to Vcc or GND, the same problem exists even without a “hat”, by programming the button pins as outputs.

In any case, the problem can be minimised by creating thoroughly tested libraries for each hat (as is the case with the pokitto’s buttons) and telling developers to always use these libraries instead of directly manipulating the hardware. This way only the people who develop the libraries are at risk to causing damage.

i am almost 100% sure you can not damage pins like this. the pins are not just hardwired to silicon. there are protection diodes and the output goes through a mosfet. i don’t believe the design is so stupid that you can burn a pin by applying Vcc to output pin set at zero. i will check this.

seriously? how would you even fry that with code? as long as the hat is running with 3.3v and no extra power sources there like not much that can happen

The same way you could with an Arduino or most other microcontrollers or other digital outputs.
See Method #1: Shorting I/O Pins to Ground:
https://www.rugged-circuits.com/10-ways-to-destroy-an-arduino/

pretty sure the buttons are pulled up/down by a resister[quote=“mwm, post:5, topic:262”]
I think GPS might be more useful than the 9DOF. If nothing else, you get the current time out of it.
[/quote]
gps is nice but since there will be a rtc on pokitto makes that current time a little less of a problem
in terms of games theres not much you can do with gps compared to gyro accelerometer

camera can be done but image manipulation might be tricky and i would expect not allot better then the gameboy camera, basically both ideas could work as there own hats, those parts are pretty expensive as well

Normally they’re not. You use the pin’s internal pull up or pull down resistor and then the button shorts the pin to either Vcc or GND.

According the to the datasheet, the high level short circuit output current is 45mA and the low level short circuit output current is 50mA.

Note 16 says this is Allowed as long as the current limit does not exceed the maximum current allowed by the device, so the LPC11U6x is a fairly robust device and shorting one pin probably won’t cause any damage.

It’s possible shorting multiple pins at the same time could cause damage. However, it’s not clear what the maximum current allowed by the device actually is. It likely depends on total power dissipation and the maximum temperature. So how many pins shorted would cause damage? It’s difficult to say.

was going to quote the same datasheet.

i have shorted gpios by accident and the device did work. so i will do tests today

btw buttons are pull-down

also i kinda think it be best to use a serial interface for the hat so games can detect it
see my gel concept
basically if there is a hat with a temperature sensor and another one with a similar sensor the game that uses it doesn’t need to be rewritten to check for both types of hats, going serial also still give you allot of extra pins to do other stuff with

A gps module, a 9dof and a raspberry pi camera are all between $5 and $10 at the low end. Of course, those are the breakout modules I normally buy for such use. Possibly if you’re buying SMD components for PCB design it might be different.

A GPS clock and an RTC are just enough different to be interesting, and work well together. In particular, the demo library for a GPS clock should use one of the button presses to set the RTC to the time coming from the GPS clock. I expect that to be set from the USB port most of the time, but having a second accurate time makes for some interesting possibilities.

I have both in my parts bin, so maybe I’ll find time to experiment with them.

Is there a list somewhere of which I/O pins are already used (if any) by current pokitto hardware, such ad buttons, speaker etc.? I think that would be a good starting point for a multi-use hat.

I think I/O pins in the header not using for hardware. Datasheet says LPC11U6x can have up to 80 I/O pins.

All you need to know to use the hat:

ok lets put this to a vote
please consider that ech item you choose will increase cost to pick as much as you want but just be aware of it
these where the ones talked about so far, any more are always welcome

  • buttons
  • IR transever
  • rumble moter
  • gpio passthrough
  • wifi/BLE
  • gyro/accelerometer/magnetometer
  • GPS

0 voters

also this, there a few ways to implement it
everything on gpio will give you fast access but you may need to deal with some decoding on the pokitto
or one of the 2 serial interfaces wich would handle some of the load with a chip on the hat that kinda managing everything

  • every part on separate pins
  • i2c
  • spi

0 voters