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

shieldbase confusion for a n00b


  • Please log in to reply
4 replies to this topic

#1 GregR

GregR

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts
  • LocationKeller, Tx

Posted 13 August 2012 - 03:08 AM

First of all...I fall into the total n00b category with all of this. I've played with the Arduino some but have very recently added a Netduino+ and a NetduinoGo to my toy box. I'm having a hard time wrapping my head around how the Go and shieldbase will work. (All of the info below is assuming the shieldbase is out of beta and everything is working without any of the current limitations that are in place for the beta). So for example, I took the Arduino library for the Chronodot and ported it and got it working just fine on the Netduino+. So let's say I wire up the Chronodot to the shieldbase...how is the standard Chronodot library going to work since it does not even know about a shieldbase or which socket that shieldbase is even plugged into? Is the library going to have to be rewritten to work specifically with the Go and shieldbase? Or am I missing something fundamental here? Or do I somehow load the Chronodot library onto the shieldbase so it can interact as if it is just on a Netduino? Thanks in advance... Greg

#2 Lunddahl

Lunddahl

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts
  • LocationEurope, Denmark

Posted 13 August 2012 - 12:29 PM

Hi Greg! When you make the I2C connection that the RTC use, you will specify what physical resources the I2C connection will use, on the Netduino+ you will specify one set of pins (that are physically located on the micro controller), on the Netduino Go you will specify another set of pins (that are located on the shieldbase), the whole idea is that you do not need to worry how the Netduino Go and the Shield Base are working together. Using a Shield Base and a RTC is somewhere expensive, and i would expect that a native RTC Go module would emerge sometime. - Ulrik Lunddahl

#3 GregR

GregR

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts
  • LocationKeller, Tx

Posted 13 August 2012 - 01:17 PM

Hi Ulrik, Thanks for your explanation. I only used the RTC example as that is what I had been working on. My confusion still lies wht the driver itself. It uses the following code to begin the connection: Clock = new I2CDevice(new I2CDevice.Configuration(CHRONODOT_ADDRESS, 100)); It never specifies any pins, etc. So that is where my confusion comes in. Thanks again! Greg

#4 Arron Chapman

Arron Chapman

    Advanced Member

  • Members
  • PipPipPip
  • 289 posts
  • LocationOregon, USA

Posted 13 August 2012 - 03:09 PM

Hi Ulrik,

Thanks for your explanation. I only used the RTC example as that is what I had been working on. My confusion still lies wht the driver itself. It uses the following code to begin the connection:

Clock = new I2CDevice(new I2CDevice.Configuration(CHRONODOT_ADDRESS, 100));

It never specifies any pins, etc. So that is where my confusion comes in.

Thanks again!
Greg


The pin specification is implicit, on the Netduino+ I2C is available only on pins A4 & A5. When taking the library to the Netduino!Go You'll have to make it more generic. What I would do is have the class' constructor take an I2CDevice as a paramter then you'll have something like this
ShieldBase sb = new ShieldBase();
I2CDevice i = new I2CDevice(new I2CDevice.Configuration(...), sb.I2C);
Clock c = new Clock(i);

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!!

 


#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 August 2012 - 03:57 PM

Hi Greg, We'll be providing an extended class for I2CDevice which allows you to select the I2C bus you want to use. We've walked through the I2C usage scenarios and I think you'll be happy with what we've come up. More to come... 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.