Shield is in the car

Home Forums Hardware AutoSense Shield Shield is in the car

This topic contains 43 replies, has 3 voices, and was last updated by Profile photo of -Jeff- -Jeff- 1 year, 6 months ago.

Viewing 15 posts - 1 through 15 (of 44 total)
  • Author
    Posts
  • #2765
    Profile photo of -Jeff-
    -Jeff-
    Participant

    So far it works well. I know it needs some improvements that Eric has mentioned, but the Interior Temperature works and the HDTuner works. I have an issue with a custom intent that worked before but Eric is aware of it and will look when time allows.

    I need a pre-amp booster for the HDTuner to my headunit, but I have been quite happy with it so far. next goal is to wire in my OBD1 bluetooth device for datalogging. I need to get a 4 relay board and have the Shield use one control line to switch between the ALDL port and the hardwired Bluetooth cable.

     

    My headunit has a delayed power down and I set the arduino to power of as soon as the key is off and it seems to work quite well. I will play around with the delay for it at some point. I also have to determine a good spot for the exterior temperature sensor and wire it in.

    NICE JOB ERIC!!

     

    #2767
    Profile photo of -Jeff-
    -Jeff-
    Participant

    Need some help with the Shield..

    my NU3001 stays on with key off. I set it to 30 minutes, I thought it was working, but now I think there is a bigger issue.. I think the Shield and Radio get caught in a shut down loop..

    Scenario.. Radio set to 30 minute delay before shutting down android.. Shield set for 30 minutes as well.. got home around 6pm shut car off.. went out.. came home at 8:30, checked car ( sat in the garage the whole time.. Android box was on, Shield was on.. powered up the radio, HDTuner was now in a muted state for sound. set shield for 0 delay, shut off key.. unplugged the arduino and it is still powered.. I am quite sure I have the 12v constant, acc and ground correct. When it works.. it works great. I need to figure out a way to kill power simply ( or not feed back)

    I don’t get why with power off, and USB disconnected the Arduino is still powered

    my theory is the Android USB powers the Arduino.. after 30 minutes the Ardunio counter starts, and it gets in a funk where the radio will not turn on. Not sure why the HDTuner was muted. yesterday it was fine and did not need a signal booster, today it does.

     

    I am going to set all timeouts to 0 and see what happens.

    #2768
    Profile photo of -Jeff-
    -Jeff-
    Participant

    Fixed the Arduino power problem.. I have ACC and 12v reversed.. it must have be wired correct, then I changed it and made it wrong

    I don’t have the audio for the HD tuner hooked up at the moment, it is muted I believe and I cannot figure out how to up mute it. It was fine earlier today

    There is also what sounds like low frequency noise ( sounds like grinding) through the speakers.. once I disconnect the HDTuner it goes away. I have to wonder if it is the added wire I put in the tuner to help with grounding ( for testing)

    my Headunit has a radio so i can use that for now..

     

    #2769
    Profile photo of Eric
    Eric
    Keymaster

    Hmmm. Maybe the shield is getting power from the NU radio. The shields shutdown timer kills the ACC line after the timeout, but if power is being fed in via USB the shield and Arduino will stay powered up.

    #2770
    Profile photo of -Jeff-
    -Jeff-
    Participant

    no it was incorrect wiring.. key off it shuts down now..

    #2771
    Profile photo of Eric
    Eric
    Keymaster

    Glad it was simple. Otherwise awesome to hear it’s working. I don’t even have AutoSense in my car any more… I did until my hardware decided to quit on me…

    #2772
    Profile photo of -Jeff-
    -Jeff-
    Participant

    Still having trouble with the one intent to switch my audio path.. I got line booster/ isolator I will try with the HD.but I really need a new or DSP to make it sound good. Makes me what to go back to a simple radio at times.. Lol

    #2773
    Profile photo of Eric
    Eric
    Keymaster

    Just so I’m looking at the correct code, you’re adding the optional broadcast intent with the buttons. So with your HD Radio button you’ve got the data in the bottom filled out with “android.intent.action.BONOVO_SET_AUDIO_CHANNEL” and Extra Data of “2”

    #2774
    Profile photo of -Jeff-
    -Jeff-
    Participant

    Eric yes..  but y extra data is “channel:2”

    I remember when we looked at this before it was a difference of string vs number that got it working..

    Here is the intent as I have it today:

     

    Attachments:
    You must be logged in to view attached files.
    #2777
    Profile photo of Eric
    Eric
    Keymaster

    From what I gather in the docs, it should just be “2” not “channel:2”
    When we looked at it before, it couldn’t have been “channel:2” otherwise I couldn’t have changed it to an int, but would always be a string.

    #2781
    Profile photo of -Jeff-
    -Jeff-
    Participant

    ok.. I will get it tested again.. thanks for looking. I will post my results

    #2782
    Profile photo of -Jeff-
    -Jeff-
    Participant

    Your last comments when we looked at this before:

    It should be a colon ”:” as in ”channel:2”.

    The code is as follows:

    if (customIntent != null ) {
    Intent intent = new Intent(getCustomIntent());
    if (customIntentExtraData != null) {
    String[] extraData = customIntentExtraData.split(”:”);
    if (extraData.length == 2) {
    intent.putExtra(extraData[0], extraData[1]);
    }
    }
    context.sendBroadcast(intent);
    }

    Basically ”getCustomIntent()” returns the ”android.intent.action.BONOVO_SET_AUDIO_CHANNEL”, then it checks if there is extra data or not, and if so, splits it on the colon, ”channel:2” into an array as extraData[0] = channel, and extraData[1] = 2. Then it puts the extra data into the intent, ”putExtra(”channel”, 2)” and sends it off.
    I did just have the though though, in the code you sent the ”2” is an integer, and I’m sending a string. I will make a quick change to check if the second part, the 2, is an integer or not, and if it is send an int not a string.

    Also now the HD tuner does not always reconnect. ( might be a power thing)

    Do the IO outputs work? can I make a button as a switch for an output? or an Output controlled by and app? it that functionality there yet?

    • This reply was modified 1 year, 6 months ago by Profile photo of Eric Eric.
    #2784
    Profile photo of Eric
    Eric
    Keymaster

    You are correct, channel:2 I guess is correct.

    The IO are not working yet, this has been a major tripping point for me trying to build a nicely expandable framework to support all the IO.  When I started going down the shield path I pretty much ripped all the old code out that had IO working.  Sadly it hasn’t been finished yet.

    #2785
    Profile photo of Eric
    Eric
    Keymaster

    I see what happened.  In the process of making more modular functionality, the custom intent was removed from how I had it with the intention of having a global handler for button presses.  So for instance what I’ve started doing is having all button presses, software and hardware go through a central controller.  It then checks for things to do when that button is pressed, for example execute a custom intent, or flip an output.  I started this and have yet to finish.

    Sorry I haven’t been releasing much code lately, life is just too crazy.  I will move this to the top of the list and see what I can do for you.

    #2788
    Profile photo of Eric
    Eric
    Keymaster

    I just pushed a new nightly.  You can see what I’m working on.  If you go to Settings->I/O Config -> Actions.  A new editor will appear.  The thought it being able to have one or many actions happen on a button press.  So you could have the HD Tuner button send a broadcast intent, set the volume, and turn on the tuner via an Arduino output.

    Still a lot of work to do, but that’s the idea.

  • Author
    Posts
  • #2765
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    So far it works well. I know it needs some improvements that Eric has mentioned, but the Interior Temperature works and the HDTuner works. I have an issue with a custom intent that worked before but Eric is aware of it and will look when time allows.

    I need a pre-amp booster for the HDTuner to my headunit, but I have been quite happy with it so far. next goal is to wire in my OBD1 bluetooth device for datalogging. I need to get a 4 relay board and have the Shield use one control line to switch between the ALDL port and the hardwired Bluetooth cable.

     

    My headunit has a delayed power down and I set the arduino to power of as soon as the key is off and it seems to work quite well. I will play around with the delay for it at some point. I also have to determine a good spot for the exterior temperature sensor and wire it in.

    NICE JOB ERIC!!

     

    #2767
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    Need some help with the Shield..

    my NU3001 stays on with key off. I set it to 30 minutes, I thought it was working, but now I think there is a bigger issue.. I think the Shield and Radio get caught in a shut down loop..

    Scenario.. Radio set to 30 minute delay before shutting down android.. Shield set for 30 minutes as well.. got home around 6pm shut car off.. went out.. came home at 8:30, checked car ( sat in the garage the whole time.. Android box was on, Shield was on.. powered up the radio, HDTuner was now in a muted state for sound. set shield for 0 delay, shut off key.. unplugged the arduino and it is still powered.. I am quite sure I have the 12v constant, acc and ground correct. When it works.. it works great. I need to figure out a way to kill power simply ( or not feed back)

    I don’t get why with power off, and USB disconnected the Arduino is still powered

    my theory is the Android USB powers the Arduino.. after 30 minutes the Ardunio counter starts, and it gets in a funk where the radio will not turn on. Not sure why the HDTuner was muted. yesterday it was fine and did not need a signal booster, today it does.

     

    I am going to set all timeouts to 0 and see what happens.

    #2768
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    Fixed the Arduino power problem.. I have ACC and 12v reversed.. it must have be wired correct, then I changed it and made it wrong

    I don’t have the audio for the HD tuner hooked up at the moment, it is muted I believe and I cannot figure out how to up mute it. It was fine earlier today

    There is also what sounds like low frequency noise ( sounds like grinding) through the speakers.. once I disconnect the HDTuner it goes away. I have to wonder if it is the added wire I put in the tuner to help with grounding ( for testing)

    my Headunit has a radio so i can use that for now..

     

    #2769
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    Hmmm. Maybe the shield is getting power from the NU radio. The shields shutdown timer kills the ACC line after the timeout, but if power is being fed in via USB the shield and Arduino will stay powered up.

    #2770
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    no it was incorrect wiring.. key off it shuts down now..

    #2771
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    Glad it was simple. Otherwise awesome to hear it’s working. I don’t even have AutoSense in my car any more… I did until my hardware decided to quit on me…

    #2772
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    Still having trouble with the one intent to switch my audio path.. I got line booster/ isolator I will try with the HD.but I really need a new or DSP to make it sound good. Makes me what to go back to a simple radio at times.. Lol

    #2773
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    Just so I’m looking at the correct code, you’re adding the optional broadcast intent with the buttons. So with your HD Radio button you’ve got the data in the bottom filled out with “android.intent.action.BONOVO_SET_AUDIO_CHANNEL” and Extra Data of “2”

    #2774
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    Eric yes..  but y extra data is “channel:2”

    I remember when we looked at this before it was a difference of string vs number that got it working..

    Here is the intent as I have it today:

     

    Attachments:
    You must be logged in to view attached files.
    #2777
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    From what I gather in the docs, it should just be “2” not “channel:2”
    When we looked at it before, it couldn’t have been “channel:2” otherwise I couldn’t have changed it to an int, but would always be a string.

    #2781
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    ok.. I will get it tested again.. thanks for looking. I will post my results

    #2782
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    Your last comments when we looked at this before:

    It should be a colon ”:” as in ”channel:2”.

    The code is as follows:

    if (customIntent != null ) {
    Intent intent = new Intent(getCustomIntent());
    if (customIntentExtraData != null) {
    String[] extraData = customIntentExtraData.split(”:”);
    if (extraData.length == 2) {
    intent.putExtra(extraData[0], extraData[1]);
    }
    }
    context.sendBroadcast(intent);
    }

    Basically ”getCustomIntent()” returns the ”android.intent.action.BONOVO_SET_AUDIO_CHANNEL”, then it checks if there is extra data or not, and if so, splits it on the colon, ”channel:2” into an array as extraData[0] = channel, and extraData[1] = 2. Then it puts the extra data into the intent, ”putExtra(”channel”, 2)” and sends it off.
    I did just have the though though, in the code you sent the ”2” is an integer, and I’m sending a string. I will make a quick change to check if the second part, the 2, is an integer or not, and if it is send an int not a string.

    Also now the HD tuner does not always reconnect. ( might be a power thing)

    Do the IO outputs work? can I make a button as a switch for an output? or an Output controlled by and app? it that functionality there yet?

    • This reply was modified 1 year, 6 months ago by Profile photo of Eric Eric.
    #2784
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    You are correct, channel:2 I guess is correct.

    The IO are not working yet, this has been a major tripping point for me trying to build a nicely expandable framework to support all the IO.  When I started going down the shield path I pretty much ripped all the old code out that had IO working.  Sadly it hasn’t been finished yet.

    #2785
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    I see what happened.  In the process of making more modular functionality, the custom intent was removed from how I had it with the intention of having a global handler for button presses.  So for instance what I’ve started doing is having all button presses, software and hardware go through a central controller.  It then checks for things to do when that button is pressed, for example execute a custom intent, or flip an output.  I started this and have yet to finish.

    Sorry I haven’t been releasing much code lately, life is just too crazy.  I will move this to the top of the list and see what I can do for you.

    #2788
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    I just pushed a new nightly.  You can see what I’m working on.  If you go to Settings->I/O Config -> Actions.  A new editor will appear.  The thought it being able to have one or many actions happen on a button press.  So you could have the HD Tuner button send a broadcast intent, set the volume, and turn on the tuner via an Arduino output.

    Still a lot of work to do, but that’s the idea.

Viewing 15 posts - 1 through 15 (of 44 total)

You must be logged in to reply to this topic.