gillham/logic_analyzer

Arduino compile error

Closed this issue · 5 comments

Hi, there thanks for this valuable tool. I have downloaded the files from this page and OLS logic sniffer from the link version 0.9.17 and have tried to add the 2 files to the plugin folder but theirs new versions so i have left them alone. The problem I'm having is

Arduino: 1.5.8 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

logic_analyzer.ino: In function 'void loop()':
logic_analyzer.ino:298:27: error: 'captureInline4mhz' was not declared in this scope
Error compiling.

and many more errors for the 4MHZ file is this some thing you could please help me with.

Thank you for taking your time to make this!! :)

Please make sure you have all three files listed below in your Arduino sketch directory:
logic_analyzer.ino https://github.com/gillham/logic_analyzer/blob/master/logic_analyzer.ino
logic_analyzer_inline_2mhz.ino https://github.com/gillham/logic_analyzer/blob/master/logic_analyzer_inline_2mhz.ino
logic_analyzer_inline_4mhz.ino https://github.com/gillham/logic_analyzer/blob/master/logic_analyzer_inline_4mhz.ino

The captureInline4mhz function is defined in the 3rd file above so that file has to be in the same directory as the main sketch.
I have not tried Arduino 1.5.x at all but I am assuming the automatic include mechanism works the same as under 1.0.x. Let me know whether you have the files together or not.

-Andrew

On Dec 18, 2014, at 7:43 PM, audiobugz notifications@github.com wrote:

Hi, there thanks for this valuable tool. I have downloaded the files from this page and OLS logic sniffer from the link version 0.9.17 and have tried to add the 2 files to the plugin folder but theirs new versions so i have left them alone. The problem I'm having is

Arduino: 1.5.8 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

logic_analyzer.ino: In function 'void loop()':
logic_analyzer.ino:298:27: error: 'captureInline4mhz' was not declared in this scope
Error compiling.

and many more errors for the 4MHZ file is this some thing you could please help me with.

Thank you for taking your time to make this!! :)


Reply to this email directly or view it on GitHub #15.

Hi, Andrew thanks for the reply. When opening the file Arduino was saying it needs to be in a folder with the same name so it was moving the file. It does compile now and link to the OLS software.

Just to make sure am that the input pins on the mega are from digital pin 22? is there any thing else i need to do to get a reading?
Is three any tutorials you know about OLS? i have been trying to search the web.

I'm new to all this and thank you for your support!! ;)

Pins 22 through 29 are sampled on the Mega. You can put a resistor (any size really, but lets say 1k) between the 5v and pin 22. Also you can do the same between ground and pin 23. That should give you a stable / known high signal on the first channel and low signal on the second. Sometimes you might get spurious high signals on the pins. Pulling unused pins low with a resistor is good to ensure they stay low in the sample instead of getting some noise from nearby pins.
With two pins in known states (one high, one low) you should try capturing a sample. Any sample rate is fine as it is a fixed signal. Just make sure the device type is listed as 'Arduino Mega Logic Analyzer' on the first setup screen. Reading the metadata should work ok provided the device is one of the Arduino types before you try to read it. It has to do with how the serial port is opened and the board auto-reset feature.
I don't know of any specific tutorials, but there are a few videos on YouTube that show the client in use with different pieces of hardware (including an Arduino) that might help. https://www.youtube.com/results?search_query=logic+sniffer
Also you can search for info on the Gadget Factory client software forum if you haven't already. http://dangerousprototypes.com/forum/viewforum.php?f=57

Hi, Andrew thanks for the detailed information i will try this out in the next few days and get back to you.

Really appreciate your time in answering my queries. :)

Any feedback on whether it is working or not? Let me know.