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 27-September 23)


By content type

See this member's


Sort by                Order  

#59603 Slow I2C Sensor Reads, is this normal?

Posted by Spiked on 07 August 2014 - 10:16 PM in Netduino Plus 2 (and Netduino Plus 1)

....a handfull of examples I came across which all appearantly did things the wrong way.....

 

Wait until you look into ultrasounds. I have yet to see a single example on the entire internet, arduino or anything else, done correctly :|




#59600 Slow I2C Sensor Reads, is this normal?

Posted by Spiked on 07 August 2014 - 09:04 PM in Netduino Plus 2 (and Netduino Plus 1)

mqtt is used separately for m2m.

 

The important thing to realize is you can allocate 1 i2c, then switch configs;

 

I2CDevice i2cBus = new I2CDevice(null);
 
I2CDevice.Configuration accellConfig = new I2CDevice.Configuration(0x53, 400),
               gyroConfig = new I2CDevice.Configuration(0x68, 400);
 
......
 
i2cBus.Config = gyroConfig;
i2cBus.Execute(new I2CDevice.I2CTransaction[] { I2CDevice.CreateWriteTransaction(GYRO_DLPF) }, 100);
System.Threading.Thread.Sleep(5);
 
I create all my recurring transactions once, then re-use them.
 
I2CDevice.I2CTransaction[] accelTrans = new I2CDevice.I2CTransaction[] {
                I2CDevice.CreateWriteTransaction(DATAX0),
                I2CDevice.CreateReadTransaction(readBuf) };
 
And read multiple bytes



#59598 Slow I2C Sensor Reads, is this normal?

Posted by Spiked on 07 August 2014 - 07:12 PM in Netduino Plus 2 (and Netduino Plus 1)

.Net  is an interpreted Managed language.

 

As such there are a few things you should not do if you want efficient code.

 

Note that efficiency was not a goal of .Net, robustness was. That doesn't mean you can not be efficient, you just can not go throwing around features that were intended to protect you from yourself, and expect efficiency.

 

In your main loop, you re-allocate (using) a i2c device 3 times every loop. That has to be cleaned up by the garbage collector. Allocate it once outside the loop, then re-use it.

 

Same can be said for your transactions.  There is NO reason to re-create 9 (or worse as I looked more, you are doing bytes?) of them every single loop.  Creating new objects is not free, nor is disposing of them when no longer being used (every loop in this case).

 

I posted an article a while back when I first started playing with the Netduino, showing an efficient way to talk to an i2c IMU; http://www.spiked3.com/?p=421

 

The code in the next post show multiple devices, so look at it also; http://www.spiked3.com/?p=438

 

Bottom line;  Think every time you use 'new', and if it is appropriate. Do not just copy someone else's code without understanding it.




#59584 Serial port issues

Posted by Spiked on 06 August 2014 - 05:34 PM in Netduino 2 (and Netduino 1)

And you need to use a separate serial usb cable/converter. Other than that, all the program does echo back any characters it receives.

 

There are a few spots in the code that bug me.  Why does he allocate a byte array of 1 byte?  just declare a byte, then use Serial readByte() and writeByte methods instead of read() and write().

 

I especially would not do a new byte every time I entered that delegate - very inefficient.




#59522 Windows Phone 8 and BLE

Posted by Spiked on 02 August 2014 - 05:06 PM in General Discussion

Cool. What is the setup? Looks like a bluetooth xbee or something on a ??? I have no idea.

Did you write the i2m app? Windows phone sdk I assume?  BLE?  I'm such a newb.

 

Anyhow thanks, very cool.




#59515 Need help with Rotary Encoder COM-11102

Posted by Spiked on 02 August 2014 - 03:44 AM in Netduino Plus 2 (and Netduino Plus 1)

Just tried it myself.  

First there is a bug in the code; I believe the line 

 

if (pinB != Pins.GPIO_NONE)

 

should have been

 

if (pinButton != Pins.GPIO_NONE)

 

but I don't see that causing the error you encountered (but maybe).

 

In my case I can rotate an encoded motor 90 degrees, and get no counts. After that, it seems to be fine, I will do some more testing.




#59464 Windows on Devices? When?

Posted by Spiked on 30 July 2014 - 01:41 PM in General Discussion

 

I'd yield a bit of faith to MS. Better, to some people "believing" in a concrete direction...

 

 

Seriously? With their track record over the last 5 years? Windows 8 (which I understand was tough nut to crack, but they didn't do so well), Windows phone (oh the stories I could tell you from that dev department), CEOs, firings (leaving the root problems in place)?  

 

You have faith?  You are a kind man :)  I am a Ms fanboy for life, but it is mostly because I'm too old to learn anything new :)




#59455 Windows on Devices? When?

Posted by Spiked on 30 July 2014 - 06:00 AM in General Discussion

I did not intend to imply people were parked in handicap spots, just the opposite. Seattle is a very handicap unfriendly city. Most of the people are (on average) young wealthy health nuts so not much attention is given to/for handicap. Thus there is NO handicap designated parking. 

 

The more I think about it, the more I think I probably would not be a good candidate for one of these boards anyhow. I don't get it. I have yet to understand ANY reason for it to exist, and especially no reason to take attention away from other existing platforms. It really looks like another Ms throw money at the wall, and see if anything sticks, and I can tell you the outcome.

 

The chat today on IRC was that indeed Ms is 'selecting' who they will be sending kits to, based on intent.




#59430 Windows on Devices? When?

Posted by Spiked on 29 July 2014 - 05:39 AM in General Discussion

I have not received one, although I did eventually get an email suggesting I would.  I followed their IRC chat for a few days and it was very quiet.

 

Ms was also supposedly at nearby at a coffee shop (in Seattle) with boards, but when I attempted to drive there, I could not find parking (and I am handicapped) so I came back home.

 

I believe the intention is to provide firmware that will allow non ms-versions to run the MS dev kits. But that will be sometime AFTER initial release of MS dev kit versions.




#59353 How to control netduino plus 2 over the Internet

Posted by Spiked on 23 July 2014 - 04:07 PM in Netduino Plus 2 (and Netduino Plus 1)

I do not think you posted in the wrong place. There is however I certain fear, at least on my part, to post instructions for doing this.

 

The fear is not from being able to do it, it actually is quite easy, the fear is that there are HUGE security implications. A person who does not understand the process to make it work, probably does not understand the security implications. Many will say "no big deal" then quickly disappear a month later when your bank account is drained.  A recent example is the pretty kick started colored lights IoT - controlled from the internet. All those who purchased said pretty lights, then followed directions, are now scrambling to recover from identity thefts.

 

IoT is a great concept, that carries a certain amount of risk. It is an area best explored by learning on your own, rather than asking for directions, in my opinion.  Start with understanding TCP/IP addressing and routing, public versus private networks and how and WHY Network address translation (aka NAT) exists. These keywords and Google should keep you busy a while, good luck.

 

http://arstechnica.c...i-fi-passwords/




#59352 Serial Issues

Posted by Spiked on 23 July 2014 - 02:40 PM in Netduino Plus 2 (and Netduino Plus 1)

If it also fails on com2, it almost certainly would be an electrical problem to me, as CW2 suggests. I suspect many of us do not even have PC's with RS-232 serial ports any longer, I know I do not.

 

Since you and your friend both have Netduinos, a netduino to netduino test might shed some light.




#59345 Serial Issues

Posted by Spiked on 22 July 2014 - 04:35 PM in Netduino Plus 2 (and Netduino Plus 1)

N/m putty.  Baud mismatch maybe?

 

Isn't there some concern using com1 while the debugger is running? I thought you had to jump through hoops to get it to work at all, so I've always just used ethernet.




#59325 New Robot Meetup Group, Seattle

Posted by Spiked on 21 July 2014 - 06:27 AM in General Discussion

Well, I have to be honest (its my nature and probably why I didn't do so well on the death star), but the weekend and this meetup didn't really go anywhere like I had hoped.

 

First on Saturday (at Seattle robotics) I was told I didn't know anything about RC (I think some of you know that is probably not the case), by a person who didn't even have their tires on correctly.

 

Then my meetup, I was told anything but an Arduino was a poor choice, and my Windows robot with a Netduino was the wrong way to do it. And that C++11 doesn't exist. I was confused on how code gets transformed into bytes to run on a computer (of which an Arduino is really the only true one). avr-gcc isn't a compiler Damn, I wasted the last 35 years as an operating systems programmer I guess. Actually the person arguing this eventually apologized, but it got a little heated in the process. I tried tactfully to indicate I was not asking if it could be done, but if anyone had done it (C++11 on an arduino), and the argument I was getting was it could not be done (which I knew was incorrect, http://stackoverflow...ram-the-arduino). I quit being tactful after a while.

 

Oh and over half no shows. 

 

Sigh, at the moment, I give up. Maybe I'll recover (my spirits) in a week or 2, but for the moment, seriously thinking of switching to knitting.




#59280 Windows on Devices? When?

Posted by Spiked on 17 July 2014 - 12:39 PM in General Discussion

The internet is full of comments, I miss some.

 

One email I got said they would send me a device soon.  Another comment says all devices have been sent. No one here has indicated they received devices.  I saw nothing in (limited) reading for non-disclosure about not saying you have one. Maybe I missed that as well.

 

The more I look at it I'm not really sure what I would use this for.  Does anyone understand why a device would boot windows then provide an exact emulation of an arduino (using wiring as the language and NO ui?).  I've got to assume something different is in the pipeline, and this is just a stepping stone. Either that or MS truly has lost its marbles. So at this point, I trust Chris's idea that great things are happening with MF, at least that WAS the intention.  Today the knife falls and we will see where and on who.




#59273 Windows on Devices? When?

Posted by Spiked on 17 July 2014 - 02:02 AM in General Discussion

Oh man, the web site redirects now.  The suspense is killing me.




#59270 New Robot Meetup Group, Seattle

Posted by Spiked on 16 July 2014 - 11:46 PM in General Discussion

Lot's of potential Ideas Nathan.  I actually have come to know the local black magic camera and internet streaming company, from the adobe premiere meetup group I am a member of. They use

 

http://new.livestream.com/

 

So yes, it is possible (and has been done recently ) Let's see how things go.

 

http://new.livestrea...585199/archives

 

In the meantime, I do have a name reserved www.ec-robotics.org if there is a need, as well as my own mostly robot site www.spiked3.com where I will post any material I get.




#59268 New Robot Meetup Group, Seattle

Posted by Spiked on 16 July 2014 - 11:08 PM in General Discussion

Oh man, this is pretty cool. I visit Seattle every few months...do you accept out-of-towners in your club? :)

I could bring Petri (my Pleo) with me? As long as you promise not to disassemble Petri.

Chris

 

Call me silly, but I have a feeling you would be a guest speaker. Other than that, of course you and anyone else are welcome any time. The meeting room I generally use holds 15-20 comfortably, so I state attendance to 12 + guests, but if need be we have some larger rooms here as well, I can only hope we grow into them.  Send me an email, and let me know your schedule next visit to town. (spiked3 at gmail).




#59257 New Robot Meetup Group, Seattle

Posted by Spiked on 16 July 2014 - 05:10 PM in General Discussion

Hey guys and gals, after my previous hobby became marked as terrorism by the FAA (Flying FPV), I have moved back into robotics.  Some of you have seen my posts concerning a personal robot project.

 

http://www.spiked3.com/?p=530

 

Anyhow, I started a meetup group in Seattle, the first meeting is this weekend.  24 members in the first week, not bad, and I am hoping it continues to grow.  The group will be very much software focused, as the last thing I want to do is be another Arduino/3D printing group. Sure we will talk hardware, but usually only in context of what software it is running and why.  I personally find the existing robotics groups barely touch on software.

 

Location is downtown Seattle, and all flavors are welcome.

 

http://www.meetup.co...-City-Robotics/




#59254 Database file?

Posted by Spiked on 16 July 2014 - 04:19 PM in Netduino Plus 2 (and Netduino Plus 1)

I started to reply. But then I thought I would re-read the question.  Which is;

"Are there any ideas that would work similar to a database other than a simple text file?"

and to that, my answer is no.  

 

I have ideas how I would handle database transactions, with store and forward guaranteed message concepts, involving simple text files, but you asked for something else. That gave me the impression you already know how to do it with simple text files, and I really can not add.

 

For other readers, who  may not know how to use simple text files; identify how you can make a db transaction atomic - ie self contained.

 

Look into things like diff files for ideas and mold the idea to fit your data - I have no real idea what your data looks like, so I can only suggest starting points.

 

Once it is atomic, write it to a separate disk file on the SD card.

 

A different thread, reads ALL files on the SD card one at a time and attempt the transaction with server/database/both. When confirmation is received that the database transaction successfully completed, the file should be erased from the SD card.  This method will survive system and network failures.  If you need to prevent accidental double updates, include a sequence number. If it has already been used indicate a previous transaction succeeded.




#59237 Windows on Devices? When?

Posted by Spiked on 15 July 2014 - 10:15 PM in General Discussion

Which makes it even more confusing as to why its not here, front and center, but I think that was already mentioned. All I know is the new boss is saying 'we aren't doing what we were doing, but I can't quite tell you what we are doing now'  - I live here, I get the inside noise a lot.  Maybe it will become clearer in a few days.

 

And of course if it isn't happening here (I assume MF is not, having not met a single person yet that works on it) it takes a while to trickle down anyhow.

 

heh, re: born for IoT, you can fool these youngins, but be careful with us old iron types. We know what it was and why :)




#59234 Windows on Devices? When?

Posted by Spiked on 15 July 2014 - 05:33 PM in General Discussion

You guys do realize 'windows on devices' was the old marching orders? The new orders are different (although confusion seems to be a recurring theme at MS) ....  layoffs are coming this week - it will be interesting to see where and how deep.




#59220 Server to Client Communication

Posted by Spiked on 14 July 2014 - 08:18 PM in Netduino Plus 2 (and Netduino Plus 1)

You will not, by definition, be able to achieve a server to client communication without action by the client. So I will assume you meant something slightly different.

 

MQTT is a subscribe / publish protocol.  A client subscribes to messages via a broker.  A server publishes messages via the same broker. In my case, the broker runs on the PC, but both the PC and Netduino act as clients AND servers. The PC publishes a request to do something, the Netduino listens for that and acts accordingly. And the Netduino publishes sensor telemetry, and the PC listens for that. 

 

Since MQTT is ethernet based, your broker would need to be internet facing in order to send messages from WAN (assuming that means internet). The broker to Netduino connection would not need to be internet facing.

 

I have used 

http://code.msdn.mic...ibrary-ac6d3858

https://m2mqtt.codeplex.com/

http://knolleary.net...lient-for-mqtt/  (arduino)

 

and for a broker 

http://mosquitto.org/

 

All have been very easy to use.




#59198 Netduino 2 Plus, New Home

Posted by Spiked on 13 July 2014 - 10:07 PM in Project Showcase

re intermatic: lol, yes :) I'm a bit handicapped, and just plain lazy. I've had this or X10, for like 15 years, I don't know how people live without them. And, I'm shocked the idea has never caught on enough to bring prices down.

 

I'm trying not to spend my all of this months retirement check, so I can get the Seeed LIDAR, the holes are there :)  My overall goal for this project is to learn SLAM, and be able to task level autonomously navigate.  I got the last robot to that point but, the Roboard-110 made too much RF noise for the GPS to ever get a fix, so I gave up on it being intelligent. I could task level tell it to move, but without encoders or GPS, I couldn't tell it where. Since I'm a little more handicapped now, I also knew that I should start thinking more indoor than outdoor, thus this bot.




#59191 Netduino 2 Plus, New Home

Posted by Spiked on 13 July 2014 - 11:30 AM in Project Showcase

DSCN1942.jpg

 

Wiring comes next.

 

full story; 

http://www.spiked3.com/?p=530

and

http://www.spiked3.com/?p=338




#59080 Netduino Plus2 ADXL345 I2C Problem with 4.3

Posted by Spiked on 07 July 2014 - 05:23 PM in Netduino Plus 2 (and Netduino Plus 1)

Glad you're running!





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.