NetduinoGO RGB Module - Netduino Go - Netduino Forums
   
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

NetduinoGO RGB Module


  • Please log in to reply
14 replies to this topic

#1 LakeOzark

LakeOzark

    Member

  • Members
  • PipPip
  • 18 posts

Posted 29 October 2012 - 05:21 PM

.
.
I have other projects running.

Here is what I have.

using SecretLabs.NETMF.Hardware.NetduinoGo;
namespace RGB_Demo
{
public class Program
{
static NetduinoGo.RGBLed led = new NetduinoGo.RgbLed(GoSockets.Socket8); // this is the socket for the first LED
public static void Main()

I get this error message.
Error 1 The type or namespace name 'NetduinoGo' could not be found (are you missing a using directive or an assembly reference?) C:\Users\AZ\documents\visual studio 2010\Projects\RGB_Demo\RGB_Demo

What am I messing?
Thanks Martin

#2 neslekkim

neslekkim

    Advanced Member

  • Members
  • PipPipPip
  • 350 posts
  • LocationOslo, Norway

Posted 29 October 2012 - 05:37 PM

you need to reference the dll for that module, check out this blogpost: http://www.chrishamm...-leds-with.aspx

--
Asbjørn


#3 LakeOzark

LakeOzark

    Member

  • Members
  • PipPip
  • 18 posts

Posted 30 October 2012 - 05:18 AM

Where do I find it? Do I need to compile a library?

#4 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 30 October 2012 - 01:53 PM

Where do I find it?

Hi Martin,

In order to add the module reference you need to right click on Add Reference in the Visual Studio Solution Explorer.
Attached File  AddReference.gif   62.82KB   12 downloads

In the Add Reference dialog box, go to the .Net tab, and look for the NetduinoGo.RgbLed library.
Attached File  ReferenceAdded.gif   82.89KB   11 downloads

Once added, you'll be able to use the two methods:
public void SetBrightness(double brightness);
public void SetColor(byte red, byte green, byte blue);

Also I noticed you will need to correct the small typo "static NetduinoGo.RGBLed" to "static NetduinoGo.RgbLed".

I hope this helps.

Cheers,
Steve

#5 neslekkim

neslekkim

    Advanced Member

  • Members
  • PipPipPip
  • 350 posts
  • LocationOslo, Norway

Posted 30 October 2012 - 01:57 PM

I was searching around to find the exact information about what to reference for this (am not close to the computer with the tools on), why is this information so hard to find?

--
Asbjørn


#6 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 30 October 2012 - 02:11 PM

I was searching around to find the exact information about what to reference for this (am not close to the computer with the tools on), why is this information so hard to find?

Hi neslekkim,

There is a post pinned at the top of the Netduino Go forum page called, "Early "Getting Started with Netduino Go" software and instructions" which details the use of the some of the first modules. To find out more about a classes contructors, methods, and members, I often just highlight a method and hit F12 (or right click and select Go to Definition) which will show you all the internal goodies of the class.

I do agree, the forum can be difficult to find some things. I find some great posts get buried deep and the search features of the forum are not the greatest. Generally I just use Google to search the forums when I need to find something. Also I highly suggest looking through the Wiki where you can find some great tutorials and code samples. For instance here's a useful page listing all of the Go Modules.

Steve

#7 neslekkim

neslekkim

    Advanced Member

  • Members
  • PipPipPip
  • 350 posts
  • LocationOslo, Norway

Posted 30 October 2012 - 03:08 PM

Yes, I read through that one, but was the dll's mentioned there?, I had to navigate around under programfiles to find the neccessary dll's.. hm.. And since you reference the wiki: http://wiki.netduino...le-RGB-LED.ashx Not mentioning the needed references there either, the module owner, secret labs in this case, could enter a bit useful info there, for comparision, look at what Nwazet have done: http://www.nwazet.co...uisition-module That's an example to follow :) Of course, we could edit the wiki ourselves, but still.. While on the topic, is there upgrades to the firmware for rgb, potmeter etc? (and btw, I use Reflector to navigate around in the dll files, very useful to find how things work, and what to do around.)

Edited by neslekkim, 30 October 2012 - 03:09 PM.

--
Asbjørn


#8 LakeOzark

LakeOzark

    Member

  • Members
  • PipPip
  • 18 posts

Posted 30 October 2012 - 03:41 PM

Hi Martin,

In order to add the module reference you need to right click on Add Reference in the Visual Studio Solution Explorer.
Attached File  AddReference.gif   62.82KB   12 downloads

In the Add Reference dialog box, go to the .Net tab, and look for the NetduinoGo.RgbLed library.
Attached File  ReferenceAdded.gif   82.89KB   11 downloads

Once added, you'll be able to use the two methods:

public void SetBrightness(double brightness);
public void SetColor(byte red, byte green, byte blue);

Also I noticed you will need to correct the small typo "static NetduinoGo.RGBLed" to "static NetduinoGo.RgbLed".

I hope this helps.

Cheers,
Steve



#9 LakeOzark

LakeOzark

    Member

  • Members
  • PipPip
  • 18 posts

Posted 30 October 2012 - 03:44 PM

Thanks. in the Add reference panel the .NET is empty.

#10 neslekkim

neslekkim

    Advanced Member

  • Members
  • PipPipPip
  • 350 posts
  • LocationOslo, Norway

Posted 30 October 2012 - 03:45 PM

Where did you find that post? Did the components get installed under "gac" now?, that's an improvement, as it wasn't like that in the version I installed (I really, really need to upgrade...) Damn, I found them now, but the list wasn't sorted, so when I fund System, I stopped looking for netduino or secretlabs, which was at the bottom.. I guess those VS devs at MS should take an usability course someday :)

Edited by neslekkim, 30 October 2012 - 03:48 PM.

--
Asbjørn


#11 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 30 October 2012 - 04:13 PM

Thanks.

in the Add reference panel the .NET is empty.

Have you installed the Netduino SDK? You can find instructions on how to do so here. The order of installation is very important. If you are still having troubles I would suggest uninstalling the Netduino SDK and the .Net Micro Framework (there is no need to uninstall Visual Studio) and reinstall everything in the order listed on the downloads page.

Steve

#12 LakeOzark

LakeOzark

    Member

  • Members
  • PipPip
  • 18 posts

Posted 30 October 2012 - 05:05 PM

I thing I will start over and reload everything. I followed the getting started instructions and just reinstalled the two .net and still th add reference net panel is empty. I am running VC# 2010 Express.

#13 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 01 November 2012 - 12:36 PM


I thing I will start over and reload everything.

Hi Martin,

Just wondering if you have made any progress and if you need any extra help?

Steve

#14 LakeOzark

LakeOzark

    Member

  • Members
  • PipPip
  • 18 posts

Posted 01 November 2012 - 09:13 PM

Hi Martin,

Just wondering if you have made any progress and if you need any extra help?

Steve


No I deleted all microsoft .net programs and downloaded from this site "downloads" via Run.

Have same problem. The add reference is empty.

this is the program...

The NetdurinoGo needs an assembly reference
Error 1 The type or namespace name 'NetduinoGo' could not be found (are you missing a using directive or an assembly reference?) C:\Users\AZ\documents\visual studio 2010\Projects\RGB_Demo\RGB_Demo\Program.cs 14 16 RGB_Demo


using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoGo;

namespace RGB_Demo
{
public class Program
{
//NetduinoGo.RgbLed led = new NetduinoGo.RgbLed();
//static NetduinoGo.RgbLed led = new NetduinoGo.RgbLed(GoSockets.Socket8); // this is the socket for the first LED
static NetduinoGo.RgbLed redLed = new NetduinoGo.RgbLed(GoSockets.Socket8);
public static void Main()
{
// write your code here

#15 LakeOzark

LakeOzark

    Member

  • Members
  • PipPip
  • 18 posts

Posted 01 November 2012 - 09:48 PM

Found my problem. Did not know that you had to go to Solution Exployer and click on References then go to Add resources in the Project menu to get a list of resources in to add resources .net panel. Thanks to lot for your help Martin




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.