Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

2 potentiometers


  • Please log in to reply
12 replies to this topic

#1 iandi

iandi

    Member

  • Members
  • PipPip
  • 23 posts

Posted 22 November 2012 - 09:45 AM

Hi All, is it possible to use 2 potentiometers? Im getting the following error: "An unhandled exception of type 'System.ArgumentException' occurred in NetduinoGo.Potentiometer.dll" on this last line NetduinoGo.RgbLed led1 = new RgbLed(GoSockets.Socket1); NetduinoGo.Potentiometer pot1 = new Potentiometer(GoSockets.Socket2); -> NetduinoGo.Potentiometer pot2 = new Potentiometer(GoSockets.Socket6); Maybe Im overlooking something obvious. Ive tested different sockets. Best wishes Andi ;-)

#2 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 22 November 2012 - 01:13 PM

Hi All,

is it possible to use 2 potentiometers?

Im getting the following error:

"An unhandled exception of type 'System.ArgumentException' occurred in NetduinoGo.Potentiometer.dll"

on this last line

NetduinoGo.RgbLed led1 = new RgbLed(GoSockets.Socket1);
NetduinoGo.Potentiometer pot1 = new Potentiometer(GoSockets.Socket2);
-> NetduinoGo.Potentiometer pot2 = new Potentiometer(GoSockets.Socket6);

Maybe Im overlooking something obvious.

Ive tested different sockets.

Best wishes

Andi ;-)

Andi,

Do you have a shieldbase plugged in also? If so it will still take up a channel (i.e. sockets 5 - 8).

Try moving the 2nd Pot to 3 or 4 instead.

I have 2 Pots, 1 RGBLed, 1 LCD display and a shieldbase (for TMP35 sensor input) connected to my Go with no problem.

The freeing of the sockets is coming soon, I think.
Chuck

#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 November 2012 - 04:35 PM

Hi Andi, You can plug your potentiometers into any GoPorts. You can plug in 8 of them if you want (or more, via the upcoming hubs). If you take the port # (GoSocket.xxx) out of the constructor does your mainboard find it automatically? And to echo Chuck: what else is plugged in? Chris

#4 iandi

iandi

    Member

  • Members
  • PipPip
  • 23 posts

Posted 23 November 2012 - 03:16 PM

Hi Chris, Hi Chuck, I have tried both, taking out the specific port out of the constructor, this didnt help. Moving the second Potentiometer to another port (port 4) helped. I have tried the following combinations (some have one Poti only!), 'failing' means that debugging complained once port of Poti2 or if no Poti2 was there, LED was called Successful Failing Failing Failing Port1: LED - - - Port2: Poti1 Poti1 Poti1 Poti1 Port3: NWAZET LCD LCD LCD LCD Port4: Poti2 LED - - Port5: serial comm serial serial serial Port6: - - - LED Port7: button button button button Port8: - Poti2 LED - However, solution 1 worked in debug mode only as long as I didnt use serial comm. What I realized several times now (which is not an issue but now we as we know it we just have to make sure that we do it) is that only after deploying and re-connecting the board, serial comm is working. Cheers Andi ;-)

#5 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 23 November 2012 - 04:59 PM

Andi,

Not sure what the status is, Did you get it working?

If not I will try to help but without knowing a little more information on what is connected to the Netduino Go and something about how you have written the code it is difficult to help correct the problem.

If you are not working on a super secret project, it would help to know:
  • What modules you have plugged in and where.
  • What references and firmware you are using.
  • The code you are trying to run.
  • It sounds like you have a shieldbase for the serial, which com port (you can't use com1 on pins D0 & D1 yet)
The more you can share the easier it is to help identify the problem. It will also help show others how to do something they may be looking for.

Chuck

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 23 November 2012 - 05:02 PM

Hi Andi,

Port5: serial comm serial serial serial

What do you have on Port5? There is no Serial module for GoBus yet.

If you disable the GoBus channel (GoPorts 5-8) then you can use the UART pins on any of those ports directly. Otherwise they're reserved for GoBus.

Chris

#7 iandi

iandi

    Member

  • Members
  • PipPip
  • 23 posts

Posted 27 November 2012 - 09:39 AM

Andi,

Not sure what the status is, Did you get it working?

If not I will try to help but without knowing a little more information on what is connected to the Netduino Go and something about how you have written the code it is difficult to help correct the problem.

If you are not working on a super secret project, it would help to know:

  • What modules you have plugged in and where.
  • What references and firmware you are using.
  • The code you are trying to run.
  • It sounds like you have a shieldbase for the serial, which com port (you can't use com1 on pins D0 & D1 yet)
The more you can share the easier it is to help identify the problem. It will also help show others how to do something they may be looking for.

Chuck


Hi Chuck,

this are the 4 differenz port distributions I have used


Successful, Failing, Failing, Failing

Port1: LED, -, -, -

Port2: Poti1, Poti1, Poti1 ,Poti1

Port3: NWAZET, LCD, LCD, LCD

Port4: Poti2, LED, -, -

Port5: serial, comm, serial, serial,

Port6: -, -, -, LED

Port7: button, button, button, button

Port8: -, Poti2, LED, -

for

[*]What references and firmware you are using.
[*]The code you are trying to run.
[*]It sounds like you have a shieldbase for the serial, which com port (you can't use com1 on pins D0 & D1 yet)[/list]The more you can share the easier it is to help identify the problem. It will also help show others how to do something they may be looking for.


I will come back in the next days as I dont have my program currently in front of me ;-)

Cheers and thanks a lot for your help

Andi

#8 iandi

iandi

    Member

  • Members
  • PipPip
  • 23 posts

Posted 27 November 2012 - 09:41 AM

Hi Andi,


What do you have on Port5? There is no Serial module for GoBus yet.

If you disable the GoBus channel (GoPorts 5-8) then you can use the UART pins on any of those ports directly. Otherwise they're reserved for GoBus.

Chris



Hi Chris,

I am using UART for serial comm on port 5. I assume I havent disabled the GoBus channel. Thats a great hint. Sorry for the stupid question, how can I do this?

Many thanks for helping out

Andi

#9 Arron Chapman

Arron Chapman

    Advanced Member

  • Members
  • PipPipPip
  • 289 posts
  • LocationOregon, USA

Posted 27 November 2012 - 05:27 PM

Hi Chris,

I am using UART for serial comm on port 5. I assume I havent disabled the GoBus channel. Thats a great hint. Sorry for the stupid question, how can I do this?

Many thanks for helping out

Andi


Simply by using the UART you've disabled the other ports. Those pins are shared among all 4 ports. Same goes for ports 1-4 if you use the UART there you disable all of those ports as well.

When you talk EE use small words, I'm just a Software Developer :)
My Blog/Site and Everything Else

If my post helped you please consider pressing the "Like This" button in the bottom right-hand corner.

 

Oh my. So many things, so little money!!

 


#10 iandi

iandi

    Member

  • Members
  • PipPip
  • 23 posts

Posted 28 November 2012 - 11:57 AM

Simply by using the UART you've disabled the other ports. Those pins are shared among all 4 ports. Same goes for ports 1-4 if you use the UART there you disable all of those ports as well.



Hi Arron,

great. Thanks for this important info!

As I need more than 5 ports, I would go now for the shield base, correct?

Cheers

Andi ;-)

#11 iandi

iandi

    Member

  • Members
  • PipPip
  • 23 posts

Posted 28 November 2012 - 01:57 PM

Hi Andi,


What do you have on Port5? There is no Serial module for GoBus yet.

If you disable the GoBus channel (GoPorts 5-8) then you can use the UART pins on any of those ports directly. Otherwise they're reserved for GoBus.

Chris


Hi Chris,

just a quick one.

As Im using more than 5 ports, and I would use the button module, is there any timeline for the GoBus Hub on the horizon?

Cheers

Andi ;-)

#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 November 2012 - 09:04 AM

Hi Andi,

As I need more than 5 ports, I would go now for the shield base, correct?

Yes, that's a good strategy. The UARTs in the GoBus ports are there for reflashing modules. You can hack into them and use them if you're willing to give up GoBus--but for 99% of serial circumstances we do recommend using a GoBus module with a UART.

The Shield Base has 3 UARTs...so you should have lots of room to play :)

Chris

#13 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 November 2012 - 09:05 AM

Hi Andi,

As Im using more than 5 ports, and I would use the button module, is there any timeline for the GoBus Hub on the horizon?

We're doing layout on the first GoBus hub hardware now. We're targeting the spring. There's lots of code and testing to do--and we want to make sure we give priority to the Ethernet and SD modules first.

Chris




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.