Pages: 1 [2] 3   Go Down
Author Topic: Practical Arduino logic analyser can't get going  (Read 4220 times)
0 Members and 1 Guest are viewing this topic.
Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 654
Posts: 50931
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is what I hear you saying:
"I jumped in the pool, and found that the end I jumped into was deeper than I thought".

Not a lot we can do about that. We preach "Start simple. Do some easy stuff first. Learn how the hardware and software work by doing simple things first", but people still don't want to wade in from the shallow end.

Massive additions to the wiki aren't going to help people that jump in the deep end, like you.
Logged

UK
Offline Offline
Full Member
***
Karma: 0
Posts: 100
Please cut all loops in plastic tin can retainers.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah well; I didn't want to play with the oscilloscope/logic analyser, I simply wanted to use them as tools to do exactly what you say, wade in with experiments but be able to see some data which I think would have made results clearer. I could not get the scope working so no tool.
I asked for help to get it going, not to develop/redevelop it or even at this wading stage find out the intricacies of how it works.
Much like driving a car to work, I don't care how the engine works but I do want to get there and it is too far to walk.

I therefore feel justified in 'appearing' to jump in at the deep end. Perhaps I just didn't explain all this guff before asking for help, so that people could decide whether to help or not based on whether I was ignorantly and stupidly jumping in at the deep end.

Perhaps now that I have given my excuse for daring to ask about a non-newbie subject, I might have created a Eureka moment elsewhere. Things are not always what they seem!

Are you a junior school teacher PaulS?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 654
Posts: 50931
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Are you a junior school teacher PaulS?
No, I'm an engineer by training and a software developer by choice. It's the training that provides (enhances?) the ability to think logically, and describe things completely (maybe too much). The software development has come with many learning curves. I've learned to understand one portion of a process at a time, much like you were trying to do.

The only issue we have with what you were doing is that you didn't start by explaining your background with the software (or lack thereof), so we assumed that you knew more than you did.

There's nothing wrong with jumping in the deep end, as long as you can swim (or have a life-preserver), you know it is the deep end, and you know where the shallow end is.
Logged

UK
Offline Offline
Full Member
***
Karma: 0
Posts: 100
Please cut all loops in plastic tin can retainers.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

My programming background is Delphi, assembler 6502-6809 over a number of years, electronics (excluding MCUs of any type) including design and prototyping Microprocessor systems (but old... 6502, 6809, 68008) machine code, again old-PDP8, but I started with Intel 8008, no, not 8080). Design of dynamic memory boards (again old). Technical writing for company manuals and logic circuit design (again old-TTL).
Teaching data processing equipment and component level fault finding (again old... Univac punched card machines, mechanical logic of Teletype etc etc etc., data processing, mag tape interfacing)
I could go on all day recounting over 40 years of electronics and logic.

However... I have not used MCUs (aren't they wonderful), prototype boards for MCUs I had never heard of the Processing language and so it didn't 'twig' what I was reading (pde file extension as with Arduino programming. Never heard of Arduino until a week or two ago. All new, however I am not a newbie to electronics or programming and so I would not consider it is the deep end, just that I could not find the beginning and did not know that Processing was an interface between the PC and external devices. As soon as I did, it all fell into place.
So I think I can swim, I just needed to find which way the beach was because my eyes were still full of water; after jumping in.

I think I have answered my own questions now thanks to Pythagorus.
I just needed that single missing link about Processing it seems.
Logged

Melbourne, Australia
Offline Offline
Full Member
***
Karma: 1
Posts: 226
Cyborg-in-progress
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
pde file extension as with Arduino programming

Yes, that's quite a trap and you're a long way from being the first person to be caught by it. Like PaulS, I assumed you already knew what Processing was but if you don't it's certainly confusing. The difference is explained in Practical Arduino, and because you mentioned you were building a PA project I assumed you had a copy of the book and had read the explanation of the oscilloscope project.

The Arduino IDE is based on a fork of the Processing IDE (via the Wiring project, but that's a whole other story) and in the early days the Arduino developers didn't bother changing the file extension. The "p" in "pde" is actually for Processing. Now, of course, Arduino has become insanely popular and is used by many people who have never heard of Processing or the origins of Arduino, and they just assume that all .pde files are Arduino sketches. Oh, and the term "sketch" is also taken from Processing where the IDE is referred to as the "sketchbook", and the language structure is similar as well. So what we've ended up with is programs called "sketches", using the same structure and the same file extension, and created using almost identical IDEs, but are intended for totally different target systems and purposes.

One of the changes being discussed for the v1.0 release of Arduino is giving it its own file extension.

So, for the benefit of anyone else coming across this thread in future:

 http://www.processing.org
 http://en.wikipedia.org/wiki/Processing_(programming_language)
--
Jon
Arduino Shield List: http://shieldlist.org
Practical Arduino: http://www.practicalarduino.com/
Logged

UK
Offline Offline
Full Member
***
Karma: 0
Posts: 100
Please cut all loops in plastic tin can retainers.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for adding to this Jon, again a clear and useful explanation. I have found that there is not a real 'thread' to follow when first encountering Arduino, even the Arduino web site, and little to indicate the obvious web of interconnections that somewhere provide the required path to follow.

Your comments and a few judicious Google's have I think shown me that I entered the chain some distance along it without realising that. One of those searches brought me the book you mention and I believe that I am now on my way. The Playground appears to be a internet in itself. Processing should be called the 'missing link'.
Thank you again for your timely intervention!

[Edit] Most problems here, on both sides, seem to be about making assumptions while lacking anything else, and failure to recognise the need to state where one is at before stepping in.
« Last Edit: October 15, 2010, 03:15:15 am by donone » Logged

UK
Offline Offline
Full Member
***
Karma: 0
Posts: 100
Please cut all loops in plastic tin can retainers.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, things weren't 100% clear. I mean that when I have all the downloaded stuff there are a million files and folders.
I am getting errors when running the processing, simple arduinoscope because I have not got libraries in folders under Sketches.
I have the folder structure for processing but when I am trying to find the libraries I don't know which folders to find them in, in order to move them, nor do i know the file extension I am looking for.

I cannot run the processing exe file because I have changed parameters and am trying to run the scope from the processing ide.

Could somebody please give me a precise folder structure under processing\sketchbook so that I can take the original downloads and move them appropriately. I don't see why only the needed files aren't included.
I am sure that such information will teach me something for the future.
« Last Edit: October 23, 2010, 08:46:51 am by donone » Logged

Melbourne, Australia
Offline Offline
Full Member
***
Karma: 1
Posts: 226
Cyborg-in-progress
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In your original message you mentioned that you were working on the project from Practical Arduino, and at one point I said I assumed that meant you had read the book. That was never clarified though, so I'll ask it directly: do you have Practical Arduino? Have you been through the steps described in it?
--
Jon
Freetronics: www.freetronics.com
Logged

UK
Offline Offline
Full Member
***
Karma: 0
Posts: 100
Please cut all loops in plastic tin can retainers.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah! Well I think there must be confusion on my part because I have read the book and again a few moments ago and I still can only see that I have to run the Processing App. It does say that I can edit certain parameters and i have done that in the .pde. Then instead of running the app (exe) I have to run the .pde in the Processing IDE, which I do and it says it cannot find Arduinoscope and it must be a missing library. I know where it is saying it should go, but I cannot find it.

I must be dense, and you must be frustrated, but perhaps it would be easy if I could compile the .pde to exe instead of running it in the IDE every time. That aside, what am I missing? Am I trying too hard to do something I shouldn't?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 654
Posts: 50931
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Then instead of running the app (exe) I have to run the .pde in the Processing IDE, which I do and it says it cannot find Arduinoscope and it must be a missing library. I know where it is saying it should go, but I cannot find it.

Quote
I must be dense
I wouldn't go that far, but it would be helpful if you could use nouns instead of pronouns more often, and copy and paste actual program output.

You need to start Processing, load a sketch, then run that sketch.
Quote
it says it cannot find Arduinoscope and it must be a missing library.
There are a lot of its in that short statement, and no clear output. Please define exactly what each "it" refers to, and show some actual output.

This really should not be that hard, but, clearly there are assumptions being made by the book's author(s), by you, and by us. One or more of those assumptions must be be correct. We'll help you figure out which one(s) are incorrect, and try to do something about it.
Logged

UK
Offline Offline
Full Member
***
Karma: 0
Posts: 100
Please cut all loops in plastic tin can retainers.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What is a pronoun...
A pronoun can replace a noun or another pronoun. You use pronouns like "he," "which," "none," and "you" to make your sentences less cumbersome and less repetitive.

In this case 'it' which I feel sure was actually decipherable in that the first two referred to the same thing, the IDE compiler, not much else was involved to give error messages! The third followed Arduinoscope which is an object  and so that is what it referred to.
I know you really are a teacher in disguise smiley
The presumptions that 'you' make are that I am naturally English speaking and that I am not a person with learning difficulties.

However, I stand corrected!!! I apologise for my hurried and poor grammar and hope that you are not offended by my response. I also know that I should not have put exclamation marks in the body of this sentence.

Here goes...
The Processing IDE issued a error message when I attempted to compile 'simpleserialarduinoscope.pde'. The message indicated that The package "Arduinoscope" did not exist and that I might be missing a library. I was then told by the Processing IDE where to place the library when and if I found the library.
The reason that I was running Arduinoscope in the IDE and not running the executable provided was because I had made changes to parameters within the source file.

I suspect (presume) that all the files and folders provided in the downloads that I mentioned in an earlier post in response to an earlier admonition, are not required and that in itself has caused some of my confusion.
I have been unable to find a comment (which I must have missed) in the book
http://books.google.co.uk/books?id=iwzo1-zmVXEC&pg=PA187&lpg=PA187&dq=arduino+logic+analyzer&source=bl&ots=mMlnyTl281&sig=LyUkxfC-1TcNkFFq9z8Q-9sSNIw&hl=en&ei=59rCTILgO93NjAfK2fi4BQ&sa=X&oi=book_result&ct=result&resnum=2&ved=0CBoQ6AEwATgU#v=onepage&q=arduino%20logic%20analyzer&f=false
 that I have read twice, that explains where the files go. I suspect that the folder network provided is not in a usable form exactly as the folder nest is provided. Some items appear to require moving and I am asking for somebody to kindly help me work out precisely which items go where in the system that I have got set up which is...
A Arduino Folder above Sketchbook above libraries and a Processing folder above Sketchbook above libraries.
When I know the answer that I seek, I feel sure that it will serve me well in future endeavours of this nature.

It is also very easy for those to whom this particular aspect is second nature, to forget that their is a first nature.

Quote
You need to start Processing, load a sketch, then run that sketch.
I did and received the error message to which I referred a few moments ago. Though I think I know, you didn't say which Sketch.
« Last Edit: October 23, 2010, 10:26:58 am by donone » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 654
Posts: 50931
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I know you really are a teacher in disguise
I am an engineer by training and a programmer by choice. Both professions require logical thinking and the ability to clearly express ideas. I am a teacher only to the extent that I like the Arduino and I want to help other people learn to like and use it, too.

Quote
The presumptions that 'you' make are that I am naturally English speaking and that I am not a person with learning difficulties.
I've made others, too. I am not even consciously aware of having made them, so learning what assumptions I've made, which ones you've made, and which ones the author(s) have made is a discovery process for all of us.

Quote
I apologise for my hurried and poor grammar and hope that you are not offended by my response. I also know that I should not have put exclamation marks in the body of this sentence.
No need to apologize. You've done nothing wrong. All that you have done is get frustrated when things didn't go as you expected, which is perfectly normal. I am not offended by completely rational reactions.

Quote
The Processing IDE issued a error message when I attempted to compile 'simpleserialarduinoscope.pde'. The message indicated that The package "Arduinoscope" did not exist and that I might be missing a library. I was then told by the Processing IDE where to place the library when and if I found the library.
This is good. Now, we know exactly what you are doing.

I am able to reproduce this problem, too. Now, let me see if I can figure out the problem. Be right back.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 654
Posts: 50931
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The instructions here are kind of vague.
http://code.google.com/p/arduinoscope/wiki/Usage
Quote
To get started with changing it, or doing something different, extract the processing lib into your sketch library dir, in a folder called "arduinoscope", or whatever you want.
You need to create, if you haven't already, a folder named libraries, in the Processing sketchbook folder. Then, you need to create a folder, in the libraries folder, named exactly "arduinoscope", not whatever you like.

Then, start the Processing IDE, and select File + Sketchbook + libraries + arduinoscope + examples + one of the example files.

Now, when you try to run the SimpleSerialArduinoscope example, you will get a different error message. This time, it says "The package "controlP5" does not exist. You might be missing a library.". The code says that the controlP5 package is available from http://www.sojamo.de/libraries/controlP5. Let's see what adding that does.

Be right back.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 654
Posts: 50931
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I downloaded the controlP5 zip file, and created a controlP5 directory in libraries. I extracted the zip file into that directory, and now the SimpleSerialArduinoscope sketch compiles, links, and runs.

The instructions for installing all the pieces and getting everything to work are not good at all. I don't blame you for getting frustrated. The Practical Arduino folks should have done a better job explaining that it is a multi-step process, and should have provided screen shots of installing all the pieces, for some version of Processing on some OS. That would have made it much easier to figure out how to do it for a different OS or different version of Processing.
« Last Edit: October 23, 2010, 11:58:08 am by PaulS » Logged

UK
Offline Offline
Full Member
***
Karma: 0
Posts: 100
Please cut all loops in plastic tin can retainers.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I thank you for continued support.

As stated I did produce the folders up to your quote except that what I actually did was to rename 'processing-arduino' to arduino and place it wholesale under libraries.
Quote
Then, you need to create a folder, in the libraries folder, named exactly "arduinoscope", not whatever you like.

Then, start the Processing IDE, and...

The only other difference is that I picked up the example file SimpleSerialArduinoscope.pde and dropped it on the Processing IDE and opened.
On this occasion I followed your instructions by going through the menu and path. Upon running I still got the same error.

To save questions; in libraries I have Arduinoscope\ then src & reference & library & examples.
In examples\ I have 3 examples one of which is SimpleSerialArduinoscope folder containing a data folder and java.policy.applet and SimpleSerialArduinoscope.pde

I obviously reserve the rest of your guidance for after this step is resolved.
Logged

Pages: 1 [2] 3   Go Up
Jump to: