Pages: 1 [2] 3   Go Down
Author Topic: arduino oscilloscope, a nice one :-)  (Read 17510 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 1
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well... you didn't explain how exactly did you get that error so it's hard to help you, and all I can do is guess.

Can you open other PDE's and flash them successfully on the arduino?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes i can open other files and flash them, i got the error when i try to open the file on the IDE, i've dowloaded the file another time to check if its not corrupted but its the same.

can you share the code here?

thanks...

EDIT: I opened the file with notepad then I copied the source diretly to the IDE and everything is working now  smiley-wink

I'll leave feedback later
« Last Edit: October 01, 2010, 09:24:38 am by CBX » Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it seems the arduino IDe doesnt like filenames that have dashes.. rename it to arduinooscillo.pde and it should work

I'll fix it in the repository, thanks!
Logged

0
Offline Offline
Jr. Member
**
Karma: 4
Posts: 65
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ya, i also had to open the file with notepad and paste the code in - not too big a deal...

I am getting a lot of crashes with the C# program - divide by zero and some others.  It seems to have a hard time 'finding' my arduino board also.  I have tried 2 computers - my VISTA computer did not work but my XP workstation did.  I'll try later with the source code assuming I can get the project to open with C# express.  That might give me a clue as to why the communication is not working.  I'm somewhat new at this so I might be missing something...

I am VERY interested in this application so I am determined to get it working and hopefully I can contribute in some tiny way.
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome! That is the spirit :-)
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

works fine on Win7 x86, but like mk3 I'm getting a lot of crashes like:


if I "zoom in" than "zoom out" quick, the program stops working (only hapened a couple of times, can be or not related);

if I select "new parallax" with the arduino in use the program crashes;

sometimes it crashes without touching in nothing and, with some seconds of use, sometimes it stays working for some minutes, but always ends up crashing...

one, two and\or three channels works fine, with four channels the window crashes;

selecting "new arduino" with it already in use, i got this program error:

if I select "repeat" the message keeps appearing, if I cancel, the program crash;

after some time working, the program crashes, the arduino's pin 13 LED stay always on and the program only works again if I reset the arduino.




whats the max and min values from the trigger?

can you divide the program in two, one for the arduino and another one for the parallax?

sorry for my bad English  :smiley
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, I released a new version that should fix the crashes,

http://xoscillo.googlecode.com/files/XOscillo_20100210.zip

known issues:
1) If you click on "new arduino" or "new parallax" when you don't actually have one it will cause a hang.. needs fixing but its not a serious issue.
2) selecting 4 channels on arduino makes it crash

I'd appreciate if you guys could give it a quick go and let me know how it goes with these fixes..

Thanks!
« Last Edit: October 01, 2010, 08:20:05 pm by xchip » Logged

0
Offline Offline
Jr. Member
**
Karma: 4
Posts: 65
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've tried the new .exe on one computer.  Nominally works but it doesn't take much poking around to make it crash, unfortunately.

I also pulled the code down so now I can open the project in C# Express 2010.

It would help if you could make an outline of the operation or... explain more of the limitations.  I understand about the prescaler but I'll have to study what you have done with the analog in.  Looks like you have bypassed the Arduino command and are using AVR and C... is that correct?  Furthermore I assume some commands must pass from the C# code back to Arduino to tell it how many channels of data to send... still need to study the code.

I also think it is likely that since this is real time it's behavior will be different on different hardware until it gets a lot of code for handling errors.  
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


The crash you are seeing is only related to the rendering of the graph..  if you comment out those few lines it can run for ages..  I believe the garbage collector is releasing some stuff it shouldn't release.
Logged

0
Offline Offline
Jr. Member
**
Karma: 4
Posts: 65
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok, thanks!

garbage collector... ya..  one of the first things I read about C# is that you cannot manually release objects... trust the GC to do it.  I don't like that very much.  I suppose there might be some way to hang on to an object you need to use.... prevent collection?

Does the C# application pass the number of channels to Arduino?.. according to the user selection?
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

[edited to add 3)]

Ok I uploaded a new release

1) More stable, removed a few race conditions
2) fixes the 4th channel issue on arduino
3) Removed the div by zero exception   <---new!

grab it here:
http://xoscillo.googlecode.com/files/XOscillo_20100210v3.zip

« Last Edit: October 02, 2010, 08:13:45 am by xchip » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

now it is stable  smiley-grin  realy nice job

can you correct 2 things in the next version?

when the trigger is 0 and if I disconnect the arduino with it in use the program crash
« Last Edit: October 02, 2010, 10:03:28 am by CBX » Logged

0
Offline Offline
Jr. Member
**
Karma: 4
Posts: 65
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley

yes, very nice. I just tested it with a sparkfun microphone breakout.  I used Audacity to create some tones to play into the microphone and then tested the FFT.  it all worked!

I tested 80HZ, 1000 HZ and 4000 HZ.  I am not sure of the sample rate yet but I did get a waveform at 4000 Hz... it looked a little... how can I say this.. .faceted?  but it was there and the FFT calculated it correctly.

Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome! At least is usable, now its time to polish it then.

As for the faceting:

 The arduino samples 7000 bytes per second so if you are scoping a 4Khz signal is normal that the wave looks faceted and that the FFT becomes somehow confused because of that.

 BTW I am looking at how can I get higher bitrates on the arduino... has anyone tried this? I know on mac it seems to work out of the box, what is the gotcha on windows?

 As for generating functions I suggest using SoundArb
   http://slatecreekengineering.com/SoundArb.htm

 Thanks guys for the support!
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 266
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

About Macintosh arduinoscope, here is one link I initiated http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1257929313 but all credit goes to Alvaro http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1256923269
« Last Edit: October 02, 2010, 11:49:07 am by selfonlypath » Logged

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