m4 for generating a numeric ID

2 views
Skip to first unread message

mike perez

unread,
Mar 4, 2012, 7:46:39 PM3/4/12
to sa-hack...@googlegroups.com
hi all,

i have 8 arduinos (actually jeenodes) which i need to flash with the
same code but each arduino will have a line defining it's own numeric
node identifier in the range 1-8.

For example, #define NODE_ID 3

I am looking for a fool-proof, paranoid-proof way of doing this. I
dont care which arduino gets which NODE_ID value as long as no two
arduino's get the same NODE_ID value. What i am thinking i want to
happen is each time i flash an arduino, the NODE_ID is incremented and
if the value exceeds 8 then it should wrap around back to value 1.
This way, even if i stop flashing the arduinos for whatever reason
(code typo, beer-time, etc) i can pick up where i left off and as long
as i flash all 8 arduinos, they'll all have different NODE_ID values.

Is m4 scripting overkill here? Is there a way to tie in m4 to the
arduino 022 IDE or will i need to go the command-line route?

--
-m.a. perez

Jeff Nading

unread,
Mar 4, 2012, 11:18:09 PM3/4/12
to sa-hack...@googlegroups.com
Mike, don,t know if this will help, but there is a guy on youtube that could help, I am one of the administrators on this forum  http://rwgresearch.com/open-projects/automatic-pulse-fire-sequence-generator/  and @ this link he was the creator [ created software for us ], of what we will use to pulse  Stan Meyers EPG, with an arduino, it's a really cool piece of software, the guys name is 

Willem Cazander

you might mention the forum if you contact him. Jeff.
--
As for most if not all of mans inventions and discoveries, we have or had to observe Gods Creation's, this in it'self proves he exists. Rom. 1:20. Have a good one, Jeff.

mike perez

unread,
Mar 5, 2012, 12:33:32 AM3/5/12
to sa-hack...@googlegroups.com
Thanks Jeff, but nevermind. I just remembered that i can set the Node
IDs at runtime over serial.

Sometimes I need to remember to "take a good, hard look at my first
revision and just say to myself, 'gloves'" :D
http://thedailywtf.com/Articles/Classic-WTF-The-Complicators-Gloves.aspx

--
-m.a. perez

kc

unread,
Mar 5, 2012, 2:34:49 AM3/5/12
to sa-hack...@googlegroups.com
Mike,

How the hell can I EVER thank-you enough for that...? Thanks for sharing! It'll be like a song that gets stuck in my head now.... "Gloves"....

Heh heh

kc




Sent via BlackBerry by AT&T. (My other car is an ANDROID!)

Jeff Nading

unread,
Mar 5, 2012, 8:53:41 AM3/5/12
to sa-hack...@googlegroups.com
KC, are you the one I met @ the Witte Museum for build it day? Or are there two of you with the same name?

kc

unread,
Mar 5, 2012, 9:24:25 AM3/5/12
to sa-hack...@googlegroups.com
Only the guy with the band... Other than him... I'm THE "KC"...!

So, "Yes", that's me!


kc


Sent via BlackBerry by AT&T. (My other car is an ANDROID!)

From: Jeff Nading <jlna...@gmail.com>
Date: Mon, 5 Mar 2012 07:53:41 -0600

Jeff Nading

unread,
Mar 5, 2012, 10:33:09 AM3/5/12
to sa-hack...@googlegroups.com
Have you started to learn how to cast aluminum yet? Here is where I learned how to cast, 
http://www.lindsaybks.com/dgjp/djgbk/series/index.html  , this guy made a complete machine shop with aluminum castings. Enjoy, if you have questions just ask, Jeff.

kc

unread,
Mar 5, 2012, 10:55:25 AM3/5/12
to sa-hack...@googlegroups.com
I melted some with a torch the other day. Watched it flow and sputter, etc. Just to keep the motivation going and to start building the familiarity with molten aluminum, etc...

Payday Friday I may get myself some sand mix and some furnace parts. I'm thinking of building a bit of a metal-working paddock in my back-yard. I was observing some iron and steel working links too. BIG difference from aluminum! Perused some "home blacksmith" sites from Google. I'd like to get an anvil but they START in the couple hundred$ range.

Through all of this I am also gardening, now is the time to prep for veggie production. I'm GROWING me some Silver Queen corn this year, if I have to plant it in 100% potting soil and use a ton of Miracle Grow and other treatments that equate to make the ears cost me $5 a piece! I built a raised bed this weekend.

Once I have everything planted, I will weld and cast while it grows. My first project: a massive WAGON for taking to soccer games and events like the Witte and the FIRST Robotics Competition. I plan to cast some of the chassis hardware in aluminum - handle, wheel hubs, linkage, etc... I'll build one for home out of steel, and one for the road out of aluminum (I need to save some money for another shielding gas tank for my MIG, argon for aluminum)

I'm the evenings, after dark, I am still working my turtle tank automation project in the garage.

We'll see!


kc


Sent via BlackBerry by AT&T. (My other car is an ANDROID!)

From: Jeff Nading <jlna...@gmail.com>
Date: Mon, 5 Mar 2012 09:33:09 -0600

KC

unread,
Mar 5, 2012, 11:17:50 AM3/5/12
to sa-hack...@googlegroups.com
So, un-hi-jacking the thread...   :-)

Man, Jeff! What an awesome link! Where do I begin?! Which one do I build first!? WOW!!

Now THAT would let me build things!

Thank-you, once AGAIN for lending the knowledge...!

kc


From: kc <kcori...@yahoo.com>
To: sa-hack...@googlegroups.com
Sent: Monday, March 5, 2012 9:55 AM

Jeff Nading

unread,
Mar 5, 2012, 11:46:59 AM3/5/12
to sa-hack...@googlegroups.com
Kc, don't spend any money on sand and clay I have plenty, or can get sand from my bosses farm, I have clay I will give you. We just need to hook up so I can show you a few things. As for your garden, there is a mushroom farm in Gonzales Tx, they sell the stuff they use to grow mushrooms, it is really good for gardens, only problem is, that they sell 3 yards at a time no less, so if you could find someone to go half's with you and a trailer, this would be the way to go, it will save you a ton of money. I bought some in Jan., had to borrow a trailer to get it though. To, I even have some sheet metal I will give you to build the furnace, you really don't have to buy much of anything to build the furnace, I can load you up with some of the junk I have laying around, ha,ha. As for an anvil, go to the junk yard and see if they have railroad rails, they will sell it to you for scrap prices.

Jeff Nading

unread,
Mar 5, 2012, 11:50:01 AM3/5/12
to sa-hack...@googlegroups.com
Your welcome Kc,cell phone is 2103237278

KC

unread,
Mar 5, 2012, 12:14:31 PM3/5/12
to sa-hack...@googlegroups.com
Hey Jeff, what about that refractory cement stuff... can I get that at any old Home Depot or do I have to order it from a place like Grainger, or what?


From: Jeff Nading <jlna...@gmail.com>
To: sa-hack...@googlegroups.com
Sent: Monday, March 5, 2012 10:50 AM
Subject: Re: [San Antonio Hackerspace] Beginning metal-working

Jeff Nading

unread,
Mar 5, 2012, 12:27:47 PM3/5/12
to sa-hack...@googlegroups.com
What I did was bought it from a place called Alamo boiler works in SA, but it's been many years ago. You can make your own as well with fire clay, old flower pots or fire brick and Portland cement.
Reply all
Reply to author
Forward
0 new messages