NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » Programming in Linux (Ubuntu)

August 05, 2011
by Volt_Amps
Volt_Amps's Avatar

Hi,

Im new to Linux and I've noticed that the guide is written for somewhat experienced users.

Can someone help me out with instructions from pages 42 to 43 (Compiling)? I just want to make sure I do everything correctly in the terminal so if I have a problem I'll know it's hardware related.

Thank you.

PS More details more better.

August 06, 2011
by Volt_Amps
Volt_Amps's Avatar

Forgot to mention it's the micro kit, temp sensor project

August 06, 2011
by Ralphxyz
Ralphxyz's Avatar

So did you get the Initialload program loaded and running?

Did you make changes "Welcome VA" to the initialload program or are you just trying to jump in with the tempsensor program?

Do you know how to use the command line in Linux?

Ralph

August 06, 2011
by Ralphxyz
Ralphxyz's Avatar

So did you get the Initialload program loaded and running?

Did you make changes "Welcome Volt_Amps" to the initialload program or are you just trying to jump in with the tempsensor program?

Do you know how to use the Command Line in Linux (now that's a silly question, but nowadays everybody tends to start with a GUI (Graphical User Interface) and some never (God forgive) actually use the Command Line)?

Ralph

August 06, 2011
by Volt_Amps
Volt_Amps's Avatar

I have not got initialload running. I've got as far as to download it and pull it up in gedit and I'm stuck there. I am familiar with using the terminal, however, I know very little about it and navigating my way through it.

I got confused by the /dev/ttyUSB0 because I kept getting a message like not authorized or something then somebody told me to do "sudo chmod 775 /dev/ttyUSB0" and I guess that worked cause it wasn't rejected or anything.

So now I'm confused about what I need to put in the terminal to run the program and/or join it with the makefile.

August 06, 2011
by Ralphxyz
Ralphxyz's Avatar

Ok I am not a Linux person (I have used it in the past but never with my Nerdkit).

So I was hoping a Linux user would jump in here but they appear to be busy.

I'll go out on a limb here and say that if you are in the folder (directory) with your code (initialload.c) and your MakeFile and you have the Nerdkit download installed all you need to do is to type "make" with no quotes. This "should" compile your code and install it to your Nerdkit mcu. Of course you have your Nerdkit USB cable plugged in.

Now this might be wrong but I believe it will be something similar and actually very simple.

So are you in the correct folder? Do you have the MakeFile and the initialload.c file? Start with the initialload project.

Please try what I have suggested and lets see what happens. I do have a Linux system so I can test if needed but my Linux is running in a virtual PC and is not running full screen so I'd prefer not have to use it.

Anyway stick with it we will get you going promise.

Ralph

August 07, 2011
by Volt_Amps
Volt_Amps's Avatar

"So are you in the correct folder?"

Negative.

(for the terminal) I can change directories to the Downloads. But I don't know how to go deeper and actually access the Code.zip or the initialload file for that matter.

(not terminal) I tried creating a new blank folder and copying/pasting the initialload file to it, that didnt work. Then I tried copy/paste the initialload and makefile seperately, didnt work either. Wouldn't let me save them to a new folder when i brought them up in gedit either.

Not sure what's up here.

Appreciate the help by the way.

August 07, 2011
by Ralphxyz
Ralphxyz's Avatar

You have to maintain the Code folder structure!

So in Windows I have D:NerdKits/Code/Project files (initialload, tempsensor etc).

The reason you have to keep the project files "under" (sub, child of) the Code folder is that there is a Library (libnerdkits) with required files that are used by your programs (lcd.h and others).

So first thing where did you unzip the Nerdkits download to?

Give me your file structure or even post a screen shot of your folder hierarchy.

From there I should be able to guide you.

It sounds like you are trying to many things so one is confusing the other.

Which is very easy to do believe me been there done that.

Ralph

August 07, 2011
by Volt_Amps
Volt_Amps's Avatar

Oh snap. Never thought about that. I figured that required files would be included in the folder of each project.

Alright don't think I have unzipped anything or know how to. I've just got the Code.zip chilling in my Downloads folder.

Structure comes up as /Code/initialload/ (again in my Downloads folder, just doesn't say that).

So I suppose for all intensive purposes you can just assume I haven't done anything yet besides put together the board, download the required software, and download the sample code.

August 07, 2011
by Ralphxyz
Ralphxyz's Avatar

Ok you are fine, you could move the code folder anywhere you please but you can work from your download folder!!

In your terminal program or from the command line just go to Download\Code\initiaload.

Check your MakeFile to make sure you have your correct USB connection (oh on some OSs you have to have the USB cable connected to the Nerdkit breadboard and the breadboard powered on to see the USB connection.

Your MakeFile should look like this:

AVRDUDEFLAGS=-c avr109 -p m168 -b 115200 -P /dev/ttyUSB0

Which is the default for the Nerdkit download. The Nerdkit guys use Linux so if you have to you can always contact them at support@nerdkits.com they will be more than glad to help out.

If your Makefile is correct you "should" be able to have your Nerdkit powered, the programming switch in the up position to the left for programming and then you type "make" with no quotes. You should see the compiler and loader run through it's steps.

Then you power off the breadboard move the switch down to the right in Run mode and power on the breadboard to get the welcome message.

Then you can modify the welcome message and do these steps again.

First thing get the welcome message.

Ralph

August 12, 2011
by Ralphxyz
Ralphxyz's Avatar

Hey Volt_Amps, did you get working?

Ralph

August 12, 2011
by Volt_Amps
Volt_Amps's Avatar

Oops. yah I did. Sorry. Your advice worked. I emailed the support people they told me to unzip it. Realized I already did that but didnt check the folder afterwards. So there was an unzipped Code file just sitting there. Did the make command on that folder's initialload and it all worked out.

Thanks for your help!

Post a Reply

Please log in to post a reply.

Did you know that you can make a huge, multi-panel LED display? Learn more...