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.

smarcus3's Content

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


By content type

See this member's


Sort by                Order  

#27930 Daisy Chain of Ic74HC595 can it control a LCD screen.

Posted by smarcus3 on 23 April 2012 - 06:41 AM in General Discussion

I already got the lcd wired up like that so itll only be re-routing a few wires. Thanks. Ill give you a positive review. Or even 2.



#27928 Daisy Chain of Ic74HC595 can it control a LCD screen.

Posted by smarcus3 on 23 April 2012 - 06:39 AM in General Discussion

Thanks. I assume I wire it up the same as on your site here: https://stefan.co/el...h-bitshift-ics/ I'll try it out tomorrow.



#27901 Daisy Chain of Ic74HC595 can it control a LCD screen.

Posted by smarcus3 on 22 April 2012 - 06:21 PM in General Discussion

Awesome!!! I was going to take a stab at doing it, but if it is already done Ill work on something else. Can't wait to see the code. Thanks



#27899 Daisy Chain of Ic74HC595 can it control a LCD screen.

Posted by smarcus3 on 22 April 2012 - 06:16 PM in General Discussion

I would love to get it in the same format as other 'interfaces' in the toolbox library such as the 7segment led.



#27898 Daisy Chain of Ic74HC595 can it control a LCD screen.

Posted by smarcus3 on 22 April 2012 - 06:13 PM in General Discussion

Yeah so that one daisy chained 595s can drive 1 lcd and other things. Sure take your time. Thanks for the help in advance.



#27896 Daisy Chain of Ic74HC595 can it control a LCD screen.

Posted by smarcus3 on 22 April 2012 - 06:00 PM in General Discussion

Hi smarcus3,

It depends on the LCD and it's required speed. Can you specify which LCD?


I was hoping you would see this.

Its this one, HERE



#27893 Transistors and resistors

Posted by smarcus3 on 22 April 2012 - 05:39 PM in General Discussion

I drew that to reference the hand drawn diagram and didn't make sure all the components were perfectly placed. Once again. Reference my first post which has been correct the whole time. Next time Ill take my time to make sure the 'rough' drawings wont be misinterpreted.



#27891 Daisy Chain of Ic74HC595 can it control a LCD screen.

Posted by smarcus3 on 22 April 2012 - 05:22 PM in General Discussion

I currently have an LCD screen controlled via a single Ic74HC595. However, using the daisy chain function like this so that the same 3 IO ports can do more than just control a single lcd, but maybe an lcd and leds.

[code=auto:0]Ic74HC595Chain ChainOut = new Ic74HC595Chain(SPI_Devices.SPI1, Pins.GPIO_PIN_D9, 2)/code]

The daisy chain wiring is shown HERE



#27870 PC rebooting on NetduinoPlus Disconnect

Posted by smarcus3 on 22 April 2012 - 06:39 AM in Beta Firmware and Drivers

Too much of a pain. Transferred back to 4.1 again for like the fifth time



#27869 Transistors and resistors

Posted by smarcus3 on 22 April 2012 - 06:39 AM in General Discussion

I am more used to the arduino platform where you get 5V, but I use those LEDs to just tell me which pins are activated. Thats it. I do agree with the placement if brightness is a concern.



#27855 PC rebooting on NetduinoPlus Disconnect

Posted by smarcus3 on 21 April 2012 - 09:35 PM in Beta Firmware and Drivers

Voted for both. Thanks



#27854 Transistors and resistors

Posted by smarcus3 on 21 April 2012 - 09:32 PM in General Discussion

Yes I just threw the LED in and didn't pay attention to its orientation. Per the placement, you could do that but I don't think it makes a difference. You need a resistor on the base anyway.



#27847 PC rebooting on NetduinoPlus Disconnect

Posted by smarcus3 on 21 April 2012 - 08:28 PM in Beta Firmware and Drivers

No change.



#27838 Transistors and resistors

Posted by smarcus3 on 21 April 2012 - 06:50 PM in General Discussion

Here is how the circuit should be designed ...

Posted Image



#27833 Transistors and resistors

Posted by smarcus3 on 21 April 2012 - 06:24 PM in General Discussion

You also need a diode around each relay as shown above to stop backflow.



#27832 Transistors and resistors

Posted by smarcus3 on 21 April 2012 - 06:10 PM in General Discussion

The resistors in each leg will be the same. I would also suggest that you color code your wires in Fritzing so that you do not mix up the hot and neutral wires (5v and gnd). Both the 12V and netduino's ground need to be tied together. The resistor value will be set based on the amount of amps and volts required by the relay's coil so that it can engage. The datasheet will give a current and voltage required. If you give me the datasheet Ill do the calculations in excel so that you can learn how to do them if you want. If you like my responses, please click the green pluses on them.



#27803 Transistors and resistors

Posted by smarcus3 on 21 April 2012 - 10:25 AM in General Discussion

This is the second time I am writing this explanation b/c the stupid forum lost the message some how. Here it goes. Hopefully this should be a nice simple explanation for you. Never be afraid to ask questions. Ill even answer them after being up all night. Current can be visualized as moving from a higher voltage to a lower voltage. This convention is the positive current convention and is the main convention due to the fact current was at one time thought to be the movement of protons. However, even though this is not the case as electrons move through the circuit, the convention has stuck. Voltage should be though of the potential to do something. This is the same thing as water flowing down a hill. Water at the top of the hill has a lot of potential energy while water at the bottom has the least, or by convention normally 0. This is the same for circuits. Current flows from the higher voltage to the lowest it can reach, normally 0 volts or commonly refereed to as ground. And per your last question. If it is all on the same loop from a high voltage to a lesser voltage it HAS TO HAVE the same current going through the entire thing. If the circuit like the one below had different currents it would be generating energy and become a perpetual motion machine. +12V --> transistor --> Relay --> Relay --> Relay --> Fan --> LED --> etc. --> ground If you still need anything else explained just let me know.



#27802 PC rebooting on NetduinoPlus Disconnect

Posted by smarcus3 on 21 April 2012 - 10:19 AM in Beta Firmware and Drivers

Ok. Ill let you know how it goes.



#27801 Transistors and resistors

Posted by smarcus3 on 21 April 2012 - 10:16 AM in General Discussion

Heating concerns with a transistor depend on whether the transistor is rated for your required load. You have to check its data sheet. They will be rated for X amps. If you give me a link to the datasheet or the name printed on your transistor I can tell you its rated amps / volts.



#27800 Transistors and resistors

Posted by smarcus3 on 21 April 2012 - 10:15 AM in General Discussion

Add up the coil resistances and all other resistances. V=IR



#27795 PC rebooting on NetduinoPlus Disconnect

Posted by smarcus3 on 21 April 2012 - 08:34 AM in Beta Firmware and Drivers

I tried to look for your response but I couldn't find it. Good plan. Give me the link so I can vote on it. I reverted back to 4.1 for the time being



#27792 PC rebooting on NetduinoPlus Disconnect

Posted by smarcus3 on 21 April 2012 - 07:42 AM in Beta Firmware and Drivers

Does anyone have a fix for this. I can not upload a program to my N as it sits on the preparing to deploy and unplugging or pressing reset kills the computer. :angry:



#27790 PC rebooting on NetduinoPlus Disconnect

Posted by smarcus3 on 21 April 2012 - 07:27 AM in Beta Firmware and Drivers

I have the same problem with a regular Netduino !!!! VERY ANNOYING



#27596 Timeout the execution of a function

Posted by smarcus3 on 18 April 2012 - 10:34 PM in General Discussion

I am testing it now with a 2500 ms maxTimeOut and sometimes my personal website doens't load in time (i.e. times out), but the code takes care of it. Hopefully this new addition will make sure an HTTP hangup will not stop the controller's main loop for longer than the maxTimeOut is set for.



#27579 Timeout the execution of a function

Posted by smarcus3 on 18 April 2012 - 07:50 PM in General Discussion

Here is a preliminary code that has only been tested on the emulator since I don't have my netduino with me right now.

Here is the helper class
using System;
using System.Threading;
using System.Runtime.Remoting;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using System.IO;
using System.Text;
using Toolbox.NETMF.NET;
using System.Diagnostics;

namespace EmailStockChecker
{
    public class clWebpageHelper
    {

        private static string _rawData = "";
        private static string _url = "";
        private static string _pageLocation = "";

        //ALLOWS FOR A MAXIMUM OF 10 SECONDS FOR THE THREAD TO FINISH BEFORE IT IS KILLED.
        private static int _maxTimeOut = 10 * 1000;//5 * 1000;

        private static Thread newThread = new Thread(new ThreadStart(Work));

        //public static void SetWebPage(string url, string pageLocation)
        //{
        //    _url = url;
        //    _pageLocation = pageLocation;
        //    _rawData = "";

        //    //newThread = new Thread(new ThreadStart(Work));
        //}

        public static void SetMaxTimeOut(int microseconds)
        {
            _maxTimeOut = microseconds;
        }
        public static string GetRawData(string url, string pageLocation)
        {
            _url = url;
            _pageLocation = pageLocation;
            _rawData = "";
            
            newThread = new Thread(new ThreadStart(Work));
            newThread.Start();

            if (newThread.Join(_maxTimeOut + _maxTimeOut))
            {
                //Debug.Print("UPDATE: JOINED");
            }
            else
            {
                Debug.Print("ERROR: TIMED OUT");
                newThread.Suspend();
                newThread = new Thread(new ThreadStart(Work));
                //newThread.Abort();
            }
            return _rawData;
        }

        private static void Work()
        {
            _rawData = GetOnlineWebPage(_url, _pageLocation);
            //Debug.Print("UPDATE: WORK THREAD COMPLETE");
        }
        
        public static string GetOnlineWebPage(string url, string pageLocation)
        {
            /* THIS FUNCTION GETS ONLINEWEBPAGES AS LONG AS THEY ARE NOT HTTPS. THE NETDUINO AT THIS POINT DOESNT
             * HANDLE DEALING WITH HTTPS PAGES OR SSL. THE WORK AROUND TO THIS IS TO USE AN PHP WEBSITE. THE FUNCITON 
             * RETURNS THE ENTIRE WEBSITE AS A LONG, LONG STRING. ALL OF THE HTML WILL BE RETURNED WITH THIS FUNCTION
             * SUCH AS HEADER AND BODY BREAKS. THIS FUNCTION GOES HAND IN HAND WITH GETSTRINGINBETWEEN
             * 
             * INPUT:   URL     --->    A STRING WHICH CONTAINS THE URL OF THE SITE SUCH AS HTTP://WWW.GMAIL.COM
             * 
             * OUTPUT:  A STRING WHICH CONTAINS ALL THE RAW DATA OF THE WEBSITE
             * 
             * SAMPLE CALL:         clMisc.getOnlineWebPage("www.smarcus3.x10.mx");
             * 
             * BASED ON THE INTEGRATEDSOCKET EXAMPLE
             */
            //string Text = "";
            try
            {
                Debug.Print("WEBPAGE: " + url + pageLocation + " ATTEMPTING TO GET");

                StringBuilder sb = new StringBuilder();

                // Defines the socket, including the remote host and port
                SimpleSocket Socket = new IntegratedSocket(url, 80); //SimpleSocket Socket = new IntegratedSocket("www.smarcus3.x10.mx", 80);

                // Connects to the socket
                Socket.Connect();

                // /ig/api?stock=EEM for finance
                // / for the root file i.e. emails

                // Does a plain HTTP request
                Socket.Send("GET " + pageLocation + " HTTP/1.1\r\n");
                Socket.Send("Host: " + Socket.Hostname + "\r\n");
                Socket.Send("Connection: Close\r\n");
                Socket.Send("\r\n");


                // Prints all received data to the debug window, until the connection is terminated and there's no data left anymore
               
                while (Socket.IsConnected || Socket.BytesAvailable > 0)
                {
                    sb.Append(Socket.Receive());
                }

                // Closes down the socket
                Socket.Close();
                Debug.Print("WEBPAGE: " + url + pageLocation + " GRABBED");
                return sb.ToString();
            }
            catch
            {
                Debug.Print("ERROR: FAILED TO START TO GRAB WEB PAGE: " + url + pageLocation);
                return "";
            }
        }
    }
}

Here is how you call it in a function such as in the main function

clWebpageHelper.GetRawData("www.google.com", "/")




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.