Comments (6)
Without any prior knowledge, but maybe a begin of getting started
:
Getting started:
Used as a start: http://data.princeton.edu/R/gettingStarted.html
cd
to the directory you (downloaded and) unzipped the develop.zip
cd
to the R
directory within the ev3dev-lang-develop
path.
On a terminal (I did this on ssh session) start R: R
Wait until the R prompt >
is shown.
Remember to enter q()
to quit the R-session.
Load the ev3dev R bindings: source("ev3dev.R")
Do not expect subsecond response times ;-)
> source("ev3dev.R")
[1] "Creating a new generic function for ‘Position’ in the global environment"
>
(maybe more later, do not yet know how to go further)
How to re-load an updated source?
E.g.
> source("ev3dev.R")
Error in eval(expr, envir, enclos) :
cannot change value of locked binding for 'ports'
from ev3dev-lang.
@BertLindeman Maybe the required packages aren't available for ARM?
@bmegli Any ideas for @BertLindeman ?
from ev3dev-lang.
Update to "howto reload" above:
To reload the bindings, remove the bindings for ports
:
rm(ports)
After that source("ev3dev.R")
can be re-done.
Packages installed at the moment here:
r-base r-cran-boot r-recommended
Packages that came along:
cdbs libblas-common libblas-dev libblas3 libjpeg-dev libjpeg62-turbo-dev liblapack-dev
liblapack3 liblzma-dev libncurses5-dev libpcre3-dev libpcrecpp0 libpng12-dev libtcl8.5
libtk8.5 libxss1 r-base-core r-base-dev r-base-html r-cran-class r-cran-cluster
r-cran-codetools r-cran-foreign r-cran-kernsmooth r-cran-lattice r-cran-mass r-cran-matrix
r-cran-mgcv r-cran-nlme r-cran-nnet r-cran-rpart r-cran-spatial r-cran-survival r-doc-html
Cannot find Rserve (as indicated to be installed in the readme.md on the R page. )
But: R does work as far as I know.
A next step is to run an example from the R bindings. E.g.
source("ev3dev_test_power_supply.R")
OK that works.
I cannot understand what is reported by Speak, would prefer textual response instead of that ;-)
Will try to make a listports.R that might be used as an IVP (installation verification procedure).
from ev3dev-lang.
I am happy that somebody tried it. Thank you for the feedback.
@BertLinderman "How to re-load an updated source?"
This is already fixed in awaiting PR
"I cannot understand what is reported by Speak, would prefer textual response instead of that ;-)"
The tests are meant be run remotely through Rserve, so you would not see the output. But you are right, outputting them also for local call would be better. Will be in the next version.
"Still rserve not found, also not found r-serve"
It's r-cran-rserve - GNU R Rserve tcp/ip server and sample clients:
sudo apt-get install r-cran-rserve
As far as I remember I had to also add some switch for apt-get to install it correctly.
Also installing it directly from inside R will fail (in R shell install.packages(...)) (not enough memory?)
I am going to write a detailed getting started from clean ev3dev install.
I have to redo all the things I did and I don't remember.
Please, be patient.
Now some note - R is not the fastest and thinnest environment.
It's not inteded for real time control, rather mixed use:
-on EV3 side simple functions for gathering data from sensors
-on PC in, say, RStudio, executing those functions remotely on EV3
-plotting data and building statistical models on PC
-using built models on EV3, possibly reimplemented in say C++
E.g. model for turning IR proximity sensor (its probably giving the energy detected as most IRs) into distance sensor coming as an example (using Phong model, but the reverse way as in graphics)
Thank you kindly for the feedback!
P.S. I am sorry for the delay in response, just too much work and too little time to play with ev3dev :/
from ev3dev-lang.
Thanks, @bmegli A bit of environment:
I just use PuTTY to the EV3 at the moment, indeed to avoid client-server problems.
apt-get install r-cran-rserve
OK now.
Test runs OK (local on EV3) so no problem on the apt-get (for me).
Do not hesitate to ask me to test.
I am flip-flopping between "Snap with nodejs" and "R"
from ev3dev-lang.
Updated readme.md of R and made pull request for it.
from ev3dev-lang.
Related Issues (20)
- Updating human-readable spec HOT 25
- How to create spec.json HOT 2
- How strictly to follow the language binding specification? HOT 6
- How to implement Button Class HOT 1
- How to use with the autogen system? HOT 26
- Unified language for Java - Library Submission HOT 5
- Having issue to connect Pycharm to the Brick HOT 3
- Standardize "systemDeviceNameConvention"
- Add binding for IR-SEEK to spec HOT 1
- Javascript motor and sensor example HOT 3
- A question about sensor inherits HOT 5
- 0.9.3? HOT 1
- Merge NXT Motor and Large Motor classes
- Some typo on the driver docs HOT 3
- stop lcd going back to menu HOT 2
- Dual motors HOT 2
- UNMET PEER DEPENDENCY bluebird@~3.5.0 HOT 7
- Buttons Error (platform-gpio-keys.0-event not found) HOT 3
- HiTechnic Compass Sensor "Device is not connected" HOT 3
- Status of the project - current ev3dev bindings HOT 1
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 ev3dev-lang.