MightyHat Built and Installed....Now What..?

Started by G550_Pilot, May 25, 2016, 03:36:55 AM

G550_Pilot

Hi Felix -

OK, per your suggestion I have the MightyHat put together and bolted to the top of my Pi3. I cannot use your image as it says it does not work on the Pi3, so I am just looking for the next steps in getting the Hat up and running.

My goal is to make this my gateway to talk to my other moteino nodes, so I think I should follow this page, correct?

http://lowpowerlab.com/gateway/#pisetup


I also assume that there has to be some script (like the ATXRaspi) that sits on the Pi and interacts with the power button on the hat. Is this the same script that is on the ATXRaspi, or will this be installed with the gateway software? If there is a different script, can you point me to it please?

Also, maybe I am heading in the wrong direction, so I am looking for a bit of advice.

I have a server running emoncms already. I just need a way to grab the data from my moteinos that I have doing things like counting pulses, etc and transmit that date to my emoncms server.

Do I need to run the entire gateway software to do that, or is there an easier/better method of doing this...?

I am running a variety of motes along with the mightyhat on a Pi3.

Thanks

Felix

There is a sketch that works with MightyHat here.
It makes it behave like ATXRaspi plus a lot more. It makes your hat a gateway for your network, and is hooked to the Pi serial, equivalent to connecting a Moteino straight to the PI GPIO serial (or a MoteinoUSB to a USB port).

The Pi software stack is separate. It's up to you what you want to choose. My Gateway software interface is basically an alternative (not the same in features) to emonCMS, and at the moment is somewhat stale because of the Pi3 release which I was not able to update to, so the step-by-step guide would be the best bet for a Pi3 (v8.1 won't work on pi3). You can always use emonCMS but you might have to change the format of the messages coming from the mightyHat (edit the sketch linked above to format messages the way emonCMS expects them, if needed).

Let me know if you have other questions.

G550_Pilot

Thanks Felix -

I just wanted to make sure I was heading in the right direction.

For the MightyHat to operate as the ATXRaspi does (battery backup and shutdown/reboot) would I need to install the shutdowncheck.sh script on the Pi?

Felix

Yes, the Pi sees the MHat the same way as an ATXRaspi. It does not care about backup or anything, all that is handled by the HAT independently.
The script is needed so the Pi knows when you press the button on the Hat (ie what to do, ex to shutdown or reboot depending if it's a steady HIGH or a pulse HIGH), also the Hat needs to know when the Pi has fully booted so it can change the LEDs statuses to reflect that. All this is illustrated in the ATXRaspi video, where conceptually everything is identical, 2 GPIOs for controlling this behavior, 2 status LEDs on the ATXRaspi to show Pi-is-booted (BootOK, green) and request-Pi-to-shutdown (Shutoff, red) signals, an LED button to show power is on.



steve v

I bought a few Mighty Hat boards rev2 and Rev3,  but I can't seem to locate the schematics for them.  Felix could you post the schematics, or if not perhaps post some additional details regarding the IO on the board ?

Felix


steve v

Felix,

Thanks for the Mighty Boost drawing that does help a little bit.  What I am trying to do is interface the Mighty Hat board with an Adafruit GSM Fona 808 board.   I am trying to figure out what 328  pins go where on the MightyHat.  I plan on not using the  MightyHat LCD.   I think I would be ok with a document that just labeled the Arduino/Moteino pin equivalents on a drawing of the MightyHat.

Is there any quick schematic or doc you could throw over the fence to me ?

Thanks

Steve

Felix

Steve,

The image above really kinda shows everything you should need. The 2 main headers are for mating the Moteino, so you already know all those pins.
There are some extra pinholes above/below those headers which serve specific functions. All these are labeled on the image and also color coded to make visual connections. But here's a text description of what is seen there: the header ABOVE is parallel with the Moteino analog side. The one BELOW is for power button & LED (D3, D5) and the shutdown/bootok signals (D6 and A0).
Below header: far left pin is RST, then GND, D3, GND, D5, D6, A0.
Inside the 2 main headers there's a few extra labeled pin holes, D7 D4, 5V etc.