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.

Spiked's Content

There have been 129 items by Spiked (Search limited from 24-September 23)


By content type

See this member's


Sort by                Order  

#60275 How to avoid 'static'

Posted by Spiked on 28 September 2014 - 03:43 PM in Netduino 2 (and Netduino 1)

I'm lazy, I hate typing more than I have to. As a result, I have adapted a method that avoids having to add 'static' to every function and variable, and follows the Arduino model a little closer. I insert the following code in just about every project I start.

 

I hope this prevents some carpel tunnel syndrome for someone;

namespace Junk2
{
    public class Program
    {
        bool instanceDone = false;
        DateTime lastTick;
        EncodedMotor M0;

        public static void Main()
        {
            var p = new Program();
            p.Setup();
            while (!p.instanceDone)
                p.Loop();
        }

        void Setup()
        {
            // do initialize things here

            // pwm, phA, phB, reversed
            M0 = new EncodedMotor(PWMChannels.PWM_PIN_D5, Pins.GPIO_PIN_D9, Pins.GPIO_PIN_D10, true);
 
            lastTick = DateTime.Now;
        }

        void Loop()
        {
            DateTime thisTick = DateTime.Now;
            TimeSpan dt = thisTick - lastTick;

            //.... more stuff

            Thread.Sleep(1000 / 20); // update N times per sec
            lastTick = thisTick;
        }
    }
}




#60512 Micro USB port not working, after drawing +5v.

Posted by Spiked on 23 October 2014 - 12:24 AM in Netduino Plus 2 (and Netduino Plus 1)

So yesterday, I needed to hook up my robot in a new way, including using a USB hub. The only power supply I found near the device that fit was 12V and I thought "what the heck, it has a regulator inside right?"  Wrong, 1 second power light was on, next it was out, for good.

 

Simple fix, $60 and order another one.




#61038 Bit Torrent with the Plus

Posted by Spiked on 21 December 2014 - 06:03 PM in Netduino Plus 2 (and Netduino Plus 1)

I know of no software that does this, so the short answer is no.

 

The long answer depends on what you mean by 'handle bit torrenting files'  

Can it copy the files and leave them encrypted? yes.

Can it decrypt the files from a stream?  probably, if you write the code.

Can it coordinate multiple port connections to optimize bit torrent throughput? probably not.

Can it generate keys and encrypt outgoing files on the fly? Maybe (but see previous restriction), how is your STM32 Assembly language and ability to generate your own firmware (do you have access to an expensive toolchain, I have not seen anything about building the current firmware any other way)? The chip can do it, can you?

 

Bottom line; not something the device is likely to do well, if at all.




#58303 XTEA

Posted by Spiked on 21 May 2014 - 12:38 AM in General Discussion

I had to look up what it was, and right there on the wiki page is code.

 

http://en.wikipedia.org/wiki/XTEA

 

what is it you are looking for?





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.