Comments (10)
I've merged your pull request.
No idea about the dotimes behaviour, I'll look into it.
from clodiuno.
Doesn't fix issue for me. :( As I can see :digital-in in conn is nil for me.
(ns clojure-arduino.core
(:use :reload-all clodiuno.core)
(:use :reload-all clodiuno.firmata))
(System/setProperty "gnu.io.rxtx.SerialPorts" "/dev/ttyACM0")
(defn -main []
(let [board (arduino :firmata "/dev/ttyACM0")]
(println @board)
(Thread/sleep 5000)
(pin-mode board 12 OUTPUT)
(digital-write board 12 HIGH)
(close board)))
{:version [2 3], :port #<RXTXPort /dev/ttyACM0>, :interface :firmata}
Exception in thread "main" java.lang.NullPointerException (NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eval(Compiler.java:5415)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$null_opt.invoke(main.clj:279)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:422)
at clojure.lang.Var.invoke(Var.java:369)
at clojure.lang.AFn.applyToHelper(AFn.java:165)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
Caused by: java.lang.NullPointerException
at clodiuno.firmata$eval54$fn__55.invoke(firmata.clj:95)
at clojure.lang.MultiFn.invoke(MultiFn.java:171)
at clojure_arduino.core$_main.invoke(core.clj:12)
at clojure.lang.Var.invoke(Var.java:361)
at user$eval112.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
... 12 more
from clodiuno.
Should be fixed now. I've manually populated digital in/out ports. Tested on Mega.
from clodiuno.
Hi,
ahhh, i think your problem is elsewhere. I did struggle with this the all week end.
What's your linux distribution ?
On Ubuntu the devices is not seen by the underlying api clodiuno uses RXTXcomm.jar - i opened a pull request to notify @samaaron about this on his api https://github.com/samaaron/serial-port (which does some of the stuff clodiuno does) - https://github.com/samaaron/serial-port/pull/4/files
You must link your device with a name that starts with /dev/ttySxx something else it is not seen.
For me, i did this:
ln -s /dev/ttyACM0 /dev/ttyS42
Hope this helps.
from clodiuno.
You can work around that by adding,
(System/setProperty "gnu.io.rxtx.SerialPorts" "/dev/ttyACM0")
I've tested it on an Ubuntu 12 with a Mega 2560 which also registers as /dev/ttyACM0.
from clodiuno.
Thanks, did not know that :D
I will try your fix now.
Thanks again
from clodiuno.
All is working for me - even the tips!
from clodiuno.
@nakkaya can you push changes to clojars?
Thanks
from clodiuno.
Pushed.
Best,
Nurullah Akkaya
http://nakkaya.com
On Mon, Jun 4, 2012 at 2:06 PM, Max Gonzih
[email protected]
wrote:
@nakkaya can you push changes to clojars?
Thanks
Reply to this email directly or view it on GitHub:
#1 (comment)
from clodiuno.
Thanks.
2012/6/4 Nurullah Akkaya <
[email protected]
Pushed.
Best,
Nurullah Akkaya
http://nakkaya.comOn Mon, Jun 4, 2012 at 2:06 PM, Max Gonzih
[email protected]
wrote:@nakkaya can you push changes to clojars?
Thanks
Reply to this email directly or view it on GitHub:
#1 (comment)
Reply to this email directly or view it on GitHub:
#1 (comment)
from clodiuno.
Related Issues (8)
- Upgrade version to get latest changes HOT 1
- Issues with reading serial input HOT 1
- Error while eval
- Does not work with xbee, probably due to reset times
- java.lang.NullPointerException at clodiuno.firmata$fn__129.invoke(firmata.clj:95) HOT 2
- Help for a newb reading GPS data? HOT 3
- NoSuchPortException with /dev/ttyUSB0 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clodiuno.