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.

trustme

Member Since 19 Aug 2010
Offline Last Active Aug 09 2011 10:10 PM
-----

Topics I've Started

AnalogInput values fail to change

31 August 2010 - 10:39 PM

I have another issue. I have a MaxSonar which I've connected to Analog port 1-5... tried them all. The Read function always returns 1023. I've hooked up a multimeter and I can see the value is changing as objects are placed in front of the sensor. I've reset the board. I've created and disposed an Interrupt port to disable the resistor mode.

            InterruptPort test = new InterruptPort(Pins.GPIO_PIN_A0, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeBoth);
            test.Dispose();

            //OutputPort p = new OutputPort(Pins.GPIO_PIN_A0, false);
            //p.Dispose();
            alarm2 = new AnalogInput(Pins.GPIO_PIN_A0);
            alarm2.SetRange(0, 100);

I'm on firmware 4.1.0.2 as I'm using Mac/Parallels to test.

It appears something is amiss. This seems like it should be a very trivial setup. 3 wires out of the MaxSonar, power, ground, and to one of the analog pins.

Is there something else I'm missing?

Introduction

31 August 2010 - 09:10 PM

Hello. I asked Chris if I could help with the port to Mac. Long time Windows user... now the job has me Mac bound. So most of my time I'm on a Mac with a VM of Win7. About 2 years ago I joined a new company that had a Windows C# product that needed to be ported to Mac. I convinced them to use Mono to reuse a large portion of the code. That has turned out to be a very good decision. Since then I've been contributing to MonoTouch and MonoMac. I actually learned of Netduino from the monotouch irc. I quickly bought one. I have always been interested in building micro projects. Netduino is of course a fantastic opportunity. It is fun learning about hardware again, I think I learned it once but that was too long ago. Looking forward to helping with the Mac port. Duane

BlinkM

26 August 2010 - 08:21 PM

I need a little help. I have a BlinkM setup I believe correctly. Here is my code:

            byte[] init = new byte[4] {(byte)'c', 0xff, 0xc4, 0x30 };
 
            I2CDevice i2c = new I2CDevice(new I2CDevice.Configuration(0x09, 100));
            I2CDevice.I2CTransaction[] xActions = new I2CDevice.I2CTransaction[4]
            {
                //I2CDevice.CreateWriteTransaction(init)
                I2CDevice.CreateWriteTransaction(new byte[] {(byte)'c'}),
                I2CDevice.CreateWriteTransaction(new byte[] { 0xff }),
                I2CDevice.CreateWriteTransaction(new byte[] { 0xc4 }),
                I2CDevice.CreateWriteTransaction(new byte[] { 0x30 })
            };

            int result = i2c.Execute(xActions, 100);



Which is my translation of this from the blinkM docs:

Wire.begin();                // set up I2C
Wire.beginTransmission(0x09);// join I2C, talk to BlinkM 0x09
Wire.send(‘c’);              // ‘c’ == fade to color
Wire.send(0xff);             // value for red channel
Wire.send(0xc4);             // value for blue channel
Wire.send(0x30);             // value for green channel
Wire.endTransmission();      // leave I2C bus

result is returning 1 when I use either the 4 CreateWrieTransactions or the single. It might be the clockRate is bad but I do not know what value to pass.

Any help or suggestions would be appreciated.
Thanks!

LoL shield

19 August 2010 - 10:02 PM

Hello.. this is very exciting. I have never played with arduino either. Can the Netduino work with the LoL shield? The LoL description refers to a library that must be installed. http://code.google.com/p/lolshield/ Is that required? Or can the C# code perform these same functions as the library etc? Thanks for your patience. Lots to learn!

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.