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.

gnomathibus's Content

There have been 13 items by gnomathibus (Search limited from 23-May 23)


By content type

See this member's

Sort by                Order  

#28766 NeonMika.Webserver

Posted by gnomathibus on 10 May 2012 - 08:55 AM in Project Showcase

hello Markus, not new to the problem with the xml along with mf Net 4.2? see you soon Gnomathibus,



#28508 NeonMika.Webserver

Posted by gnomathibus on 03 May 2012 - 08:20 PM in Project Showcase

hello, here is the screenshot just: one step BEFORE jumping to Dispose () ;)

Attached Thumbnails

  • xmlneonmika.png



#28310 NeonMika.Webserver

Posted by gnomathibus on 29 April 2012 - 08:40 PM in Project Showcase

Here is a screenshot of the error in debug mode step by step, if I use the NET MF 4.2, it can be is the problem? see you soon and thank you again

Attached Thumbnails

  • xml liste.PNG



#28291 NeonMika.Webserver

Posted by gnomathibus on 29 April 2012 - 12:30 PM in Project Showcase

hello, great reactivity! ;) I just tried the test code "multixml" but I get the following error in the debuger when I call to the function / multixml: customer connected Final byte count: 315 Request URL = multixml Start checking Requests A first chance exception of type 'System.Exception' Occurred in NeonMika.XML.dll WAS thrown exception: System.Exception



#28104 NeonMika.Webserver

Posted by gnomathibus on 25 April 2012 - 09:22 PM in Project Showcase

ok my result is : <Response> <value_26>0</value_26> <value_10>0</value_10> <value_5>0</value_5> </Response> but I would have <Response> <id>26</id> <value>0</value> </Response> <Response> <id>10</id> <value>0</value> </Response> <Response> <id>26</id> <value>0</value> </Response>



#28097 NeonMika.Webserver

Posted by gnomathibus on 25 April 2012 - 07:03 PM in Project Showcase

thank you very much for your answer it works, but with a Multidimensional Array how to?



#28083 NeonMika.Webserver

Posted by gnomathibus on 25 April 2012 - 10:50 AM in Project Showcase

Hello, Neon Mika.Webserver is really good :) if I try to send the entire contents of an array to xml, is this possible?



#27482 Use MAX521 DAC with i2c

Posted by gnomathibus on 17 April 2012 - 07:59 PM in Netduino Plus 2 (and Netduino Plus 1)

Thank you very much for your help Guido, but I solved my problem in the afternoon if I had not put pull-up resistor to the SDA and SCL ports on my arduino while I did not need to Max521 one, here is the wiring diagram that works impeccably well now and for me and my code snippet :)

using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoPlus;
using NetduinoPlusTesting;


namespace Maxdac
{
    public class Maxdacdevice 
    {

        
        private I2CDevice.Configuration _slaveConfig;
        private const int TransactionTimeout = 3000; // ms
        private const byte ClockRateKHz = 100;
        public byte Address { get; private set; }
       
       
         

        public Maxdacdevice(byte address)
        {
            Address = address;
            _slaveConfig = new I2CDevice.Configuration(address, ClockRateKHz);
        
        }

        public void write(byte port, byte value)
        {
        
            I2CBus.GetInstance().Write(_slaveConfig, new byte[] { (byte)(0x07 & port), value }, TransactionTimeout);
        
        }

        public void reset()
        {
        
            I2CBus.GetInstance().Write(_slaveConfig, new byte[] { (byte)(0x10) }, TransactionTimeout);
      
        }

        public void shutDown(Boolean shutdown)
        {
            if (shutdown == true)
            {

                I2CBus.GetInstance().Write(_slaveConfig, new byte[] { (byte)(0x08), (byte)(0x00) }, TransactionTimeout);
            }
            else
            {

                I2CBus.GetInstance().Write(_slaveConfig, new byte[] { (byte)(0x00), (byte)(0x00) }, TransactionTimeout);

            }
        }


    }
}

and the progam


using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoPlus;
using Maxdac;
using NetduinoPlusTesting;

namespace NetduinoPlusApplication5
{
    public class Program
    {
       
        public static void Main()
        {
            // write your code here
            OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);

            Maxdacdevice Max1 = new Maxdacdevice(0x2A);
            Maxdacdevice Max2 = new Maxdacdevice(0x29);

            Max1.reset();
            Max2.reset();
            Thread.Sleep(500);

            //Set FULLPOWER to MAX521 Adress(0x2A) DAC04  
            Max1.write(4,255);
            //Set FULLPOWER to MAX521 Adress(0x29) DAC01
            Max2.write(1, 255);
            Thread.Sleep(5000);

            //resets all registers to off
            Max1.reset();
            Max2.reset();
            Thread.Sleep(5000);


            //shuts down the DAC into power save mode
            Max1.shutDown(true);
            Max2.shutDown(true);
            Thread.Sleep(5000);

                       
            //wakes the DAC. Any write command will also wake the DAC from power save mode
            Max1.shutDown(false);
            Max2.shutDown(false);
            Thread.Sleep(5000);

           //Set HALFPOWER to MAX521 Adress(0x2A) DAC04  
            Max1.write(4, 127);
           //Set HALFPOWER to MAX521 Adress(0x2A) DAC01  
            Max2.write(1, 127);
            Thread.Sleep(5000);

            

            while (true)
            {
                led.Write(true);
                Thread.Sleep(250);
                led.Write(false);
                Thread.Sleep(250);
            }


        }

    }
}

Attached Thumbnails

  • Netduino_MAX521.jpg



#27401 Use MAX521 DAC with i2c

Posted by gnomathibus on 16 April 2012 - 07:48 PM in Netduino Plus 2 (and Netduino Plus 1)

I had already tried but unfortunately it does not work, I have the following error message: throw new Exception ("Could not write to device."); :(



#27393 Use MAX521 DAC with i2c

Posted by gnomathibus on 16 April 2012 - 07:10 PM in Netduino Plus 2 (and Netduino Plus 1)

thank you very much for the interest in my problem Guido, effectively addresses are possible for the MAX521 0x28, 0x29, 0x2A, 0x2B


I in my promgram instantiates as:
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoPlus;
using Maxdac;
using NetduinoPlusTesting;

namespace NetduinoPlusApplication5
{
    public class Program
    {
       
        public static void Main()
        {
            // write your code here
            OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);

            Maxdacdevice Max = new Maxdacdevice(0x2A);
                    
            
            Max.write();

            while (true)
            {
                led.Write(true);
                Thread.Sleep(250);
                led.Write(false);
                Thread.Sleep(250);
            }


        }

    }
}

The first write statement writes zero to DAC7. Is this right?
What should the second write statement do?

I2CBus.GetInstance().Write(_slaveConfig, new byte[] { 0x07 , 0x00 }, TransactionTimeout);
I2CBus.GetInstance().Write(_slaveConfig, new byte[] { 0xFF }, TransactionTimeout);



As I said in my topic I used the existing Arduino library that works fine as an example for me is a 0x07 B00000111 "Bitwise"? , 0x00 DAC0 and 0xFF has a full power

here the example of the library in Arduino Cpp:

maxdac::maxdac(byte address) //address should be 7 bits
{
  Wire.begin();
  _address = address;
}

void maxdac::write(int port, int value) //port is 0-7 for MAX521 and 0-3 for MAX520
{
  Wire.beginTransmission(_address); //tell the device we are ready to begin transmitting
  Wire.send((B00000111 & port)); //use some BitWise "&" to combine the command to write to a port with the port you wish to write to
  Wire.send(value); //send the actual value to the port
  Wire.endTransmission(); //stop communication
}


thank you again !



#27377 Use MAX521 DAC with i2c

Posted by gnomathibus on 16 April 2012 - 02:02 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello,

I want to use a MAX521 in I2C with my Netduino, I use the class I2CBus found on the forum, but I am having dificulties with the function to write a value to a regitre

here is my code:
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoPlus;
using NetduinoPlusTesting;


namespace Maxdac
{
    public class Maxdacdevice 
    {

        
        private I2CDevice.Configuration _slaveConfig;
        private const int TransactionTimeout = 3000; // ms
        private const byte ClockRateKHz = 100;
        public byte Address { get; private set; }
        
        
         

        public Maxdacdevice(byte address)
        {
            Address = address;
            _slaveConfig = new I2CDevice.Configuration(address, ClockRateKHz);
         
        }
        
       
        public void write()
        {

         //Send command write Full Power DAC0

            I2CBus.GetInstance().Write(_slaveConfig, new byte[] { 0x07 , 0x00 }, TransactionTimeout);
            I2CBus.GetInstance().Write(_slaveConfig, new byte[] { 0xFF }, TransactionTimeout);

        }

       


    }
}


in fact I try to do a translation of an existing library for Arduino, but since I'm a beginner it was not easy for me
The link from the site of the library MAX520 / 1 for Arduino
and the to linkthe documentation of the IC

Sorry for my poor English I use Google to translate if someone could help me it would be super cool!



#24012 Extend PWM output

Posted by gnomathibus on 09 February 2012 - 10:41 AM in Netduino 2 (and Netduino 1)

thank you for the answer, my project is to control multiple DC controlled dimmer via ethernet, I need for that much that I shall convert PWM output to 0-10v with LM358



#23968 Extend PWM output

Posted by gnomathibus on 08 February 2012 - 02:03 PM in Netduino 2 (and Netduino 1)

hello, I seek to extend the number PWM output, is this possible?




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.