EV3 + LeJOS + Kotlin + intellij: seeking collaboration

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

New User
Posts: 6
Joined: Sun Jul 16, 2017 5:10 pm

EV3 + LeJOS + Kotlin + intellij: seeking collaboration

Postby salamanders » Sun Mar 04, 2018 9:25 pm

[Kotlin](https://medium.com/@octskyward/why-kotl ... 5c001e26e3) is IMHO a great programming language for education. I got it working on my EV3, with a development loop that is **almost** self-sufficient: IntelliJ coding, gradle build and deploy to the brick over WiFi, but then I have to run the app and see the console output using the Eclipse [EV3Control](https://lejosnews.wordpress.com/2014/04 ... otors-tab/)

I'm looking for help to make it completely self-sufficient so I don't have to hop between IDEs. I think it would require remotely running the app and capturing the console from a deploy script?

Project at https://github.com/salamanders/waller

For example, here is a line-following app:

fun main(args: Array<String>) {
println("Follow that line!")

RobotWheels().use { wheels ->
EV3ColorSensor(SensorPort.S3).use { lightSensor ->
val redSensorMode = lightSensor.redMode
val lightSample = FloatArray(redSensorMode.sampleSize())

var numSamples = 0
buildSequenceTime(msFromNow = 10_000).forEach {
redSensorMode.fetchSample(lightSample, 0)
// println("Light: ${lightSample[0]}")
if (lightSample[0] < .5) {
wheels.left = 1.0
wheels.right = 0.1
} else {
wheels.left = 0.1
wheels.right = 1.0
println("Done sensing, $numSamples")
println("Bye bye.")

User avatar
Advanced Member
Posts: 377
Joined: Wed Sep 13, 2006 12:16 am
Location: UK, Milton Keynes

Re: EV3 + LeJOS + Kotlin + intellij: seeking collaboration

Postby esmetaman » Tue Mar 27, 2018 6:29 pm

If you like, you can build your examples on Java 9 and soon in Java 10 for EV3 Brick & Brick Pi 3 using the LeJOS port on EV3Dev:

Last week, we started the migration to Debian Stretch. Latest stable version is v0.7.0 for Debian Jessie.


Juan Antonio
Juan Antonio Breña Moral

Return to “EV3 Software”

Who is online

Users browsing this forum: No registered users and 1 guest