Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arduino_ide package #2888

Merged
merged 1 commit into from Nov 27, 2018

Conversation

@JL2210
Copy link
Contributor

commented Nov 20, 2018

Fixes #2841
Depends on #2887

Add arduino_ide package

Tested on:

  • x86_64
packages/arduino_ide.rb Outdated Show resolved Hide resolved
packages/arduino_ide.rb Outdated Show resolved Hide resolved
Add arduino_ide package
Update to use ENV["CREW_NOT_STRIP"]
@uberhacker

This comment has been minimized.

Copy link
Collaborator

commented Nov 26, 2018

@JL2210: Were you planning on updating this PR? We only need a few changes, correct?

@JL2210

This comment has been minimized.

Copy link
Contributor Author

commented Nov 26, 2018

@uberhacker Done.

@JL2210

This comment has been minimized.

Copy link
Contributor Author

commented Nov 26, 2018

I was away from the Chromebook/Internet over Thanksgiving. I had an uncle over.

system "echo 'sudo chmod o+w /dev/ttyACM*' >> arduino"
system "echo 'sommelier -X --x-display=\$DISPLAY --scale=\$SCALE #{CREW_PREFIX}/share/arduino-#{version}/arduino \"$@\"' >> arduino"
system "echo 'echo \"Disabling Arduino write access...\"' >> arduino"
system "echo 'sudo chmod o-w /dev/ttyACM*' >> arduino"

This comment has been minimized.

Copy link
@uberhacker

uberhacker Nov 26, 2018

Collaborator

Not sure I follow this logic. Why do you need write access to the devices? That seems odd.

This comment has been minimized.

Copy link
@JL2210

JL2210 Nov 26, 2018

Author Contributor

So you can flash the compiled code to their chips/onboard storage.

This comment has been minimized.

Copy link
@uberhacker

uberhacker Nov 26, 2018

Collaborator

You need write access to device files to do that?

This comment has been minimized.

Copy link
@JL2210

JL2210 Nov 27, 2018

Author Contributor

Yes. The /dev/ttyACM* files are device files pointing to to the Arduino devices.

This comment has been minimized.

Copy link
@uberhacker

uberhacker Nov 27, 2018

Collaborator

What needs to write to the device files? That doesn't make any sense.

This comment has been minimized.

Copy link
@JL2210

JL2210 Nov 27, 2018

Author Contributor

"The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board."
The Arduino IDE needs to write the compiled code to the Arduino via. the device files.

This comment has been minimized.

Copy link
@uberhacker

uberhacker Nov 27, 2018

Collaborator

Right, it needs to write to Arduino, not the actual device files.

This comment has been minimized.

Copy link
@JL2210

JL2210 Nov 27, 2018

Author Contributor

The onboard storage of the Arduino IS the device file. The device file isn't writable unless we allow write access to it, which we're doing with this.

This comment has been minimized.

Copy link
@JL2210

JL2210 Nov 27, 2018

Author Contributor
system "echo >> arduino"
system "echo 'echo \"Enabling Arduino write access...\"' >> arduino"
system "echo 'sudo chmod o+w /dev/ttyACM*' >> arduino"
system "echo 'sommelier -X --x-display=\$DISPLAY --scale=\$SCALE #{CREW_PREFIX}/share/arduino-#{version}/arduino \"$@\"' >> arduino"

This comment has been minimized.

Copy link
@uberhacker

uberhacker Nov 26, 2018

Collaborator

Shouldn't the sommelierd daemon handle this also?

This comment has been minimized.

Copy link
@JL2210

JL2210 Nov 27, 2018

Author Contributor

It doesn't work in this case. There must be something wrong with it.

This comment has been minimized.

Copy link
@uberhacker

uberhacker Nov 27, 2018

Collaborator

There is nothing wrong with sommelier. You likely just need to create a symlink:

system "ln -s #{CREW_PREFIX}/share/arduino-#{version}/arduino #{CREW_DEST_PREFIX}/bin/arduino"

This comment has been minimized.

Copy link
@JL2210

JL2210 Nov 27, 2018

Author Contributor

That won't work. The sommelier daemon doesn't run it properly. It also still needs to make the device files writable.

This comment has been minimized.

Copy link
@uberhacker

uberhacker Nov 27, 2018

Collaborator

I guess I'm still not understanding why you would need to write to device files. A device file is not meant for storage. If you run the arduino executable by itself, it should work with the sommelierd daemon running just like any other executable.

This comment has been minimized.

Copy link
@JL2210

JL2210 Nov 27, 2018

Author Contributor

The application accesses the Arduino by way of opening the device files. It evidently doesn't work, even while running startsommelier && /usr/local/share/arduino-1.8.7/arduino.

This comment has been minimized.

Copy link
@uberhacker

uberhacker Nov 27, 2018

Collaborator

Alright, I guess this is enough back and forth. I'm merging it. :)

@uberhacker uberhacker merged commit 4ea0f45 into skycocker:master Nov 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.