Setting up in Linux

Community contributed apps
Post Reply
enigma32
Posts: 74
Joined: Fri Apr 26, 2013 11:48 am
Location: Los Angeles and NYC

Setting up in Linux

Post by enigma32 »

Forgive my ineptitude here...

I installed the Wizard-2.1.3 "tool" from the git repo as per the installation instructions in it's folder... but when I try to run the Wizard, I get:

Code: Select all

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: processing.app.Editor.getBase()Lprocessing/app/Base;
	at com.reefangel.tool.Wizard.run(Unknown Source)
and so on and so forth...

I've spent some time in the Arduino community (and time with native AVR code), but am not familiar with Processing.
Do I need Processing to run the wizard?

Is there a set of instructions for getting this up and running on linux that I've overlooked somewhere?


I'm using Arduino 1.0.4 on Ubuntu 10.04.
Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Setting up in Linux

Post by rimai »

I think you are missing the pde.jar
We use a modified compilation of the Arduino IDE to use the Wizard and also the auto-features selection.
http://forum.reefangel.com/viewtopic.php?p=12866#p12866
Roberto.
enigma32
Posts: 74
Joined: Fri Apr 26, 2013 11:48 am
Location: Los Angeles and NYC

Re: Setting up in Linux

Post by enigma32 »

That was it! Thank you!

I did the following:
1) Install pde.jar in [arduino directory]/lib/ overwriting the existing one
2) Install the contents of update.zip in ~/sketchbook/
3) Install the Wizard-2.1.3 folder in ~/sketchbook/tools (it doesn't seem to be happy in [arduino directory]/tools/)

I haven't been able to get the RestorePreloaded or RALibsVersion tools to work yet... but it is possible I've just made a mistake with them.


Also, I opted for "Generate Only" at the end of the wizard (since my hardware isn't due to arrive until tomorrow), and this occurred:

Code: Select all

java.lang.InternalError: Text component read only
	at processing.app.syntax.JEditTextArea.setSelectedText(JEditTextArea.java:1361)
	at processing.app.Editor.setSelectedText(Editor.java:1498)
	at com.reefangel.tool.Wizard.ConstructCode(Unknown Source)
Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Setting up in Linux

Post by rimai »

I think Curt has a installation package for unbutu.
Maybe you ought to take a look at it.
lnevo and mudcat1 also use it with no problem.
I was able to use the wizard even on a wheezy pi distribution.
Roberto.
enigma32
Posts: 74
Joined: Fri Apr 26, 2013 11:48 am
Location: Los Angeles and NYC

Re: Setting up in Linux

Post by enigma32 »

hmm, works now. Apparently it either needed a restart or needed the libraries placed in another location... (I had to move them to ~/sketchbook/libraries instead of where I originally had them in place of the default arduino libraries folder)

*shrug*
Adruino is always a pain :-)

For reference, this is a summary of everything I did:
1) Install pde.jar in [arduino directory]/lib/ overwriting the existing one
2) Install the contents of update.zip in ~/sketchbook/
3) Install the Wizard-2.1.3/Wizard (https://github.com/reefangel/Wizard/tre ... 1.3/Wizard) folder in ~/sketchbook/tools/Wizard
4) git cloned the Libraries repo (https://github.com/reefangel/Libraries) at ~/sketchbook/libraries
5) Unzipped the contents of RestorePreloaded-1.2.2.zip (https://github.com/reefangel/RestorePre ... -1.2.2.zip) into ~/sketchbook/tools/RestorePreloaded
6) Unzipped the contents of RALibsVer-1.zip (https://github.com/reefangel/RALibrarie ... sVer-1.zip) into ~/sketchbook/tools/RALibsVer
These appear to be the most recent versions of these various things as of 2013-05-01.

I was able to successfully run the wizard and build the resulting code.


RestorePreloaded throws an exception, but I could be misusing it (I simply clicked the link with an empty sketch open):

Code: Select all

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at processing.app.Sketch.load(Sketch.java:171)
	at processing.app.Sketch.<init>(Sketch.java:142)
	at processing.app.Editor.handleOpenInternal(Editor.java:2161)
	at processing.app.Base.handleOpenReplace(Base.java:619)
	at com.reefangel.tool.RestorePreloaded.run(Unknown Source)

Thanks for your help!
I'll try and catch up with Curt over the next couple days to see if he does have a package that would simplify this for me.
Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Setting up in Linux

Post by lnevo »

There us a post with the package curt put together. If you search for linux install on the forum it should come up. I just reinstalled this past weekend with the new libraries and realized i had a problem when trying to add the twi.c fix for the new libraries.

I realized i was on version 1.0 of the ide and the package used 1.0.1. So i tried that too and then i tried 1.0.4. I had all the same issues as you (although it looks like you made more progress than me...) i switched to curts install package and everything worked great. So thats how i left it.

I then spent the next hour making the launcher icon work again :) since launching it and pinning that to the launcher tried to open sketch_date afterwards...
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Setting up in Linux

Post by binder »

http://forum.reefangel.com/viewtopic.php?f=8&t=1846

I have not updated the software to accommodate for the new version of the libraries though.
enigma32
Posts: 74
Joined: Fri Apr 26, 2013 11:48 am
Location: Los Angeles and NYC

Re: Setting up in Linux

Post by enigma32 »

Thanks guys. I'll give this a try.

I don't suppose we could put a link to that somewhere like the "downloads" page where the links for windows and osx are? :-)

I'd be happy to maintain a linux package once I get it working initially.
Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Setting up in Linux

Post by rimai »

Yeah, I'll add the link to Curt's post in the Download section
Roberto.
enigma32
Posts: 74
Joined: Fri Apr 26, 2013 11:48 am
Location: Los Angeles and NYC

Re: Setting up in Linux

Post by enigma32 »

I downloaded Curt's zip file and it helped me resolve my remaining issue. (Thank you!)
I'm now running arduino-1.0.4 properly with RA (and even burned an image onto my hardware that arrived today!).

For reference, it seems I needed two additional things in my list above:

7) Copy RA_Preloaded.ino to ~/sketchbook/RA_Preloaded/RA_Preloaded.ino (I don't actually see this file in the repository anywhere... got my copy from Curt's zip file.)
For the simplified list of options in the Boards menu (this will overwrite the arduino options typically available if you overwrite the file):
8) Set contents of [arduino directory]/hardware/arduino/boards.txt to be only, or to include:

Code: Select all

##############################################################

reefangel.name=Reef Angel Controller

reefangel.upload.protocol=stk500
reefangel.upload.maximum_size=30720
reefangel.upload.speed=57600
reefangel.bootloader.low_fuses=0xFF
reefangel.bootloader.high_fuses=0xDA
reefangel.bootloader.extended_fuses=0x05
reefangel.bootloader.path=atmega
reefangel.bootloader.file=ATmegaBOOT_168_atmega328.hex
reefangel.bootloader.unlock_bits=0x3F
reefangel.bootloader.lock_bits=0x0F
reefangel.build.mcu=atmega328p
reefangel.build.f_cpu=16000000L
reefangel.build.core=arduino
reefangel.build.variant=standard

##############################################################

RA.name=Reef Angel Controller w/ optiboot
RA.upload.protocol=arduino
RA.upload.maximum_size=32256
RA.upload.speed=115200
RA.bootloader.low_fuses=0xff
RA.bootloader.high_fuses=0xde
RA.bootloader.extended_fuses=0x05
RA.bootloader.path=optiboot
RA.bootloader.file=optiboot_ReefAngel.hex
RA.bootloader.unlock_bits=0x3F
RA.bootloader.lock_bits=0x0F
RA.build.mcu=atmega328p
RA.build.f_cpu=16000000L
RA.build.core=arduino
RA.build.variant=standard

##############################################################

RAPlus.name=Reef Angel Plus Controller
RAPlus.upload.protocol=stk500v2
RAPlus.upload.maximum_size=258048
RAPlus.upload.speed=115200
RAPlus.bootloader.low_fuses=0xFF
RAPlus.bootloader.high_fuses=0xD8
RAPlus.bootloader.extended_fuses=0xFD
RAPlus.bootloader.path=stk500v2
RAPlus.bootloader.file=stk500boot_v2_RAPlus.hex
RAPlus.bootloader.unlock_bits=0x3F
RAPlus.bootloader.lock_bits=0x0F
RAPlus.build.mcu=atmega2560
RAPlus.build.f_cpu=16000000L
RAPlus.build.core=arduino
RAPlus.build.variant=mega
The standard arduino examples are removed from Curt's distribution as well; I've left mine intact for now.

If I may ask, Curt, is there a particular reason you went with ~/Arduino/ instead of ~/sketchbook (which I think is the default in unix-land, since I can't imagine I would have changed it way back when I set it up initially...)?
Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Setting up in Linux

Post by binder »

enigma32 wrote: If I may ask, Curt, is there a particular reason you went with ~/Arduino/ instead of ~/sketchbook (which I think is the default in unix-land, since I can't imagine I would have changed it way back when I set it up initially...)?
I believe it had to do with uniformity across all platforms. Windows and Mac both utilize the Arduino directory in the "documents" folder. So to keep things consistent, I believe that was why I did that. It also can possibly have something to do with the auto library updater as well. I think it looks for a specific directory to check for the libraries (or it may not, I don't recall).

So, I believe it was for uniformity and consistency with the other platforms. :)
enigma32
Posts: 74
Joined: Fri Apr 26, 2013 11:48 am
Location: Los Angeles and NYC

Re: Setting up in Linux

Post by enigma32 »

Fair enough.
I'd point out, though, that it's still not quite the same:

windows:
[home]/Documents/Arduino/

unix:
[home]/Arduino/

Not that it really matters; I was just curious. Personally I've always hated that it (arduino) created a folder in my home directory by default :-)
If I get ambitious I might try to build a .deb package... I've just never done one completely from scratch before.
Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Setting up in Linux

Post by binder »

enigma32 wrote:Fair enough.
I'd point out, though, that it's still not quite the same:

windows:
[home]/Documents/Arduino/

unix:
[home]/Arduino/

Not that it really matters; I was just curious. Personally I've always hated that it (arduino) created a folder in my home directory by default :-)
If I get ambitious I might try to build a .deb package... I've just never done one completely from scratch before.
Yeah, I know. I'm not a fan of a folder being created in my home directory by default either. It was just simpler to stick with Arduino name instead of trying to confuse people.

I thought about doing a .deb package as well, but didn't I didn't fully understand the package creation process. It wanted to do a build of the package when there really wasn't any package to build. I guess that goes with my lack of knowledge of the package creation process.
enigma32
Posts: 74
Joined: Fri Apr 26, 2013 11:48 am
Location: Los Angeles and NYC

Re: Setting up in Linux

Post by enigma32 »

Ah, sorry-- I meant that I don't like the *arduino* default of adding ~/sketchbook.
I don't have any problem with the way you packaged things up.

As for packaging... yeah, it gets pretty murky relatively quickly. I've built a bunch of rpms and debs for newer versions of existing packages, using the original spec files as a starting point, and even that took a while to figure out. Oh well... someday.... :-)
Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Setting up in Linux

Post by binder »

heh, yeah....I knew what you meant.

yes, I agree it gets pretty murky fast. I'm all for creating a deb pkg for simplicity for people. So if you start working on it, I'd be up for helping out as well.....someday.... :)
enigma32
Posts: 74
Joined: Fri Apr 26, 2013 11:48 am
Location: Los Angeles and NYC

Re: Setting up in Linux

Post by enigma32 »

haha sounds like a plan. I'll ping you when I start to look at it.
Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
Post Reply