Author Topic: MightyHat + RPi3 problems [solved]  (Read 2660 times)

jarrah

  • NewMember
  • *
  • Posts: 4
MightyHat + RPi3 problems [solved]
« on: July 21, 2018, 08:18:55 PM »
Hi,

Just got my MightHat R3 and assembled it. No LCDs were available, so I sourced my own and added that. So far I haven't been able to get anything to work.

1. If the MH is not attached to the RPi then the shutoff led blinks and the boost led is steady. No display. Unable to see the USB device on my Mac (I can see the device if I plug in a MoteinoUSB so the port/cable/driver is working.) Pushing the reset button causes the tactile button to light up red, then everything goes back to as before.

2. If the MH is attached to the RPi, plugging a USB cable into the MH results in exactly the same behavior as #1. The RPi does not seem to have power.

3. Plugging USB into RPi with MH attached starts the RPi and powers the MH. This time the 5v led is also lit. If I attach USB to Mac I still don't see any USB device. Running "avrdude" command with MH sketch causes the tactile button to flash red (I assume it's resetting the MH), then it seems to hang until I hit ^c.

Any help would be appreciated!

Greg
« Last Edit: September 26, 2018, 09:42:53 AM by Felix »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MightyHat + RPi3 problems
« Reply #1 on: July 23, 2018, 12:06:09 PM »
Hi Greg!

The MHat USB is ONLY for powering the MHat(+Pi when attached) and for charging. It does NOT provide a serial/data connection.
The FTDI header on the opposite side can be used for programming, OR if you want to program from the Pi side (check this page) there are a few things to do and you can do it that way as well.

You will have to program the board first before you get any LCD activity. A sample sketch is provided in the Mhat guide.

You will have to mate the MHat with the Pi. It uses the GPIO serial to communicate with the Pi. You will have to open the serial either in an app like minicom to monitor the GPIO serial:
Code: [Select]
minicom -b 115200 -o -D /dev/ttyAMA0

This assumes nothing else is using the GPIO serial on your Pi, and serial console or bluetooth-to-GPIO-serial is disabled, again see the MHat guide for those details.

Please let me know of the progress and any further issues.

jarrah

  • NewMember
  • *
  • Posts: 4
Re: MightyHat + RPi3 problems
« Reply #2 on: July 23, 2018, 06:38:20 PM »
Hi Felix,

Thanks for the reply. I didn't realize that the MHat USB is not for data, so that explains #1. I was trying to program via the Pi in #3. However, I was using /dev/ttyAMA0 but now realize it should be /dev/ttyS0 on the Pi 3. When used that device it worked, so now I have uploaded the MightHat sketch and the LCD is working!

The only thing that is not working now is powering the Pi using the MHat. When I attach the USB adapter to the MHat, it powers up, but the Pi does not. Is there something else that I need to do to get that to work?

Thanks!
Greg

jarrah

  • NewMember
  • *
  • Posts: 4
Re: MightyHat + RPi3 problems
« Reply #3 on: July 23, 2018, 06:41:50 PM »
I discovered that pushing the white button powered the Pi on. I don't remember reading that in the docs, but at least it's working now.

Regards,
Greg

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MightyHat + RPi3 problems
« Reply #4 on: July 24, 2018, 09:34:07 AM »
Oh yes :)
I must have missed to specify what is obvious to me. While in the sketch it's being used as a "power button", in general it can be used for any purpose since it's wired to A2 of the microcontroller which can decide what to do with a "button-press". I added a little note to the assembly step to make it more clear.

https://lowpowerlab.com/guide/mightyhat/assembly/

Thanks for the feedback, can this topic be considered solved then?

jarrah

  • NewMember
  • *
  • Posts: 4
Re: MightyHat + RPi3 problems
« Reply #5 on: September 25, 2018, 09:32:58 PM »
Yes, thank you!