• Stars
    star
    173
  • Rank 220,124 (Top 5 %)
  • Language
    Java
  • Created over 13 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Program your Arduino in Java

Welcome to the JArduino project, powered by ThingML!

Browse the dist folder to get the latest JArduino distribution, which you can import as an Eclipse project. People interested in the concepts behind JArduino can read our paper "MDE to manage communications with and between resource-constrained systems". If you are more into the code, just try it out for real!

$ git clone https://github.com/SINTEF-9012/JArduino.git

##Serial usage

Before using JArduino, please make sure your Arduino board contains the JArduino firmware:

  1. Copy the JArduino folder (located in the distribution in jarduino.core/src/main/arduino/ into your arduino working directory at Arduino/libraries/
  2. Launch your Arduino environment
  3. File -> Examples -> JArduino -> JArduino firmware. It should open an Arduino program that you should upload to your board using the normal Arduino procedure.
  4. Your Arduino board is now ready for Jarduino. You can exit the Arduino environment forever and launch Eclipse. Just run the Java/JArduino program.

To test samples using the current version of JArduino (requires Maven + the Arduino board connect on the serial port of the computer):

$ cd JArduino	
$ mvn clean install

To run some examples without IDE

$ cd jarduino.samples
$ mvn exec:java -Dexec.mainClass="org.sintef.jarduino.gui.JArduinoGUI"

Replace "org.sintef.jarduino.gui.JArduinoGUI" with your own main class

Please read our [2-minute tutorial] (https://github.com/SINTEF-9012/JArduino/wiki/2-Minute-Tutorial)

Ethernet usage

  1. Instead of JArduino folder, copy the JArduinoEthernet folder to Arduino IDE librairies folder
  2. Launch Arduino environment
  3. File -> Examples -> JArduinoEthernet -> JArduino firmware. It should open an Arduino program that you should 4. if you have associated the MAC address of your shield to a static IP in your router, please update the MAC address in the firmware (line 84). Otherwise, DHCP should manage everything. 5. upload to your board using the normal Arduino procedure.
  4. Your Arduino board is now ready for JarduinoEthernet. You can exit the Arduino environment forever and launch Eclipse. Just run the Java/JArduino program.

JArduinoEthernet does not need JArduino.serial maven dependency, don't forget to remove it if you want to use JArduino from an Android application for instance.

You Can can now use the JArduino constructor to configure the IP of your device. Don't forget to set the communication module to ethernet:

JArduino arduino = new BlinkEthernet(ip, JArduinoCom.Ethernet)

To run a sample using Ethernet:

mvn clean install exec:java -Dexec.mainClass="org.sintef.jarduino.examples.basic.BlinkEthernet" -Dexec.args="<IP-address-of-Arduino-board>"

Android and Bluetooth usage

To run these examples you need to have a recent android platform. Then you just have to go in the org.sintef.jarduino.samples.android where you can find a basic android application that make a blink on the pin13 of the Arduino and read the value on the pinA0. This application connects the android platform to the Arduino using a bluetooth adapter so you have to set the name of your bluetooth device into deviceName in the program.

private String deviceName = "NameOfYourBluetoothDevice";

You can also see the Android GUI in the folder org.sintef.samples.android.gui. Here also, you must set the bluetooth device name using the preference screen in order to connect to the Arduino. The preference screen can be reached using the "settings" button on the top of the screen. Android Arduino GUI

In the top middle of the screen you can see the list of all the orders sent to the Arduino. In fact there are two lists. The "loop" list and the "setup" list. You can edit each one of those using the "Loop" or "Setup" option on the top of the screen and then writing orders using the GUI.

In the bottom middle of the screen see the responses sent from the Arduino to the Android pltaform.

If you click the button Run (Play), the orders of the setup list will be executed once, and the loop list orders will be executed infinitely. Pause: pauses the execution of the orders. If play is pressed while it is paused, it will continue. Stop: stops the execution. Clear: clear the two lists (loop and setup). Delay: a pop-up will be open to set the delay you wish. Save: save the two lists into the specified file. Load: load the two lists contained into the specified file. Ping: send a ping to the Arduino.

When you click on a Pin Button (blue with white edges) a list of action is displayed and you can choose the one you want to perform. If you want to make an Analog write, a pop-up will be open to allow you to set the value you want to write.

Make also sure that you are performing an action supported by the Arduino. Unattended action will result in unattended results.

The ThingML/JArduino team.

Bitdeli Badge

More Repositories

1

PruneCluster

Fast and realtime marker clustering for Leaflet
TypeScript
550
star
2

Proto2TypeScript

Generate TypeScript definitions from a Protocol Buffers model
JavaScript
68
star
3

UnrealMosquitto

A MQTT client with blueprint support for Unreal Engine 4, based on Mosquitto.
C
47
star
4

Leaflet.MapPaint

Bitmap map painting
JavaScript
44
star
5

SINDIT

Sintef Digital Twin
Python
43
star
6

bglib

Java implementation of the BGAPI binary protocol for Bluegiga BLE112 Bluetooth low energy modules.
Java
36
star
7

cloudml

CloudML: Transparent deployment of cloud applications
Java
27
star
8

kafka-mqtt-source-connector

A connector plugin to use with Kafka's Connect API. It can be configured to map any topic from an mqtt broker to any topic on the Kafka broker. The connector can be configured to use SSL in communication with the mqtt broker.
Java
24
star
9

rtcharts

Real Time Chart Library for JAVA
Java
22
star
10

grindr-privacy-leaks

Report and raw data about privacy leaks in Grindr.
17
star
11

SimplifyUnreal

A port of Simplify.js, a high-performance polyline simplification library
C++
12
star
12

bvr

Base Variability Resolution (BVR) metamodel, engine and editors
Java
11
star
13

Rodash

_.set, _.get, and _.unset for Ruby
Ruby
10
star
14

Caracal

Light multimedia web server designed as a service
JavaScript
10
star
15

canvas-odometer

A HTML odometer using canvas.
JavaScript
9
star
16

ThingModel

Synchronize data and models across multiple devices
C#
8
star
17

kafka-mqtt-sink-connector

A connector plugin to use with Kafka's Connect API. It contains functionality to extract a topic from the Kafka record and publish to that topic on the mqtt broker, if dynamic publishing is required. The connector can be configured to use SSL in communication with the mqtt broker.
Java
8
star
18

kafka-prometheus-sink-connector

A hackable Kafka sink connector to "push" (expose HTTP endpoint) data into Prometheus
Java
7
star
19

TinyWebSockets

A lightweight top level api in c++ for web sockets
C++
5
star
20

traale

Drivers and applications for the Traale sensor unit developed by SINTEF.
Java
5
star
21

language-atomthingml

Atom grammar for ThingML
JavaScript
5
star
22

Leaflet.GameController

Gamepads interactions for Leaflet
JavaScript
5
star
23

cloudml-dsl

A text-based language to write CloudML model
Java
4
star
24

thingml-diversifier

Diversifying ThingML models
Java
3
star
25

vive-position-sensor

Inspired by ashtuchkin/vive-diy-position-sensor but re-implemented in ThingML and including full on-board calibration and setup.
C++
3
star
26

PolyPong

The ultimate ballgame
Java
3
star
27

rtsync

Lightweight time synchronization algorithm for wireless sensors
Java
3
star
28

remics-essence

REMICS Essence Method Library (EssWork Practice Workbench projects)
JavaScript
3
star
29

sensapp-android

Sensapp Android Applications
Java
3
star
30

TinyOpenZWaveApi

A tiny top level api for open-zwave
HTML
3
star
31

sensapp-admin

Administration Interface for the SensApp platform
JavaScript
3
star
32

MQTT_Replicator

Multi-master replication for all MQTT message brokers.
JavaScript
3
star
33

SMAc

State Machine with Scala Actors
Scala
3
star
34

diva

Modeling Language for Dynamic Variability - Licensed under the Apache License, Version 2.0
Java
2
star
35

SPLCATool

Software Product Line Covering Array Tool (SPLCATool)
HTML
2
star
36

node-red-contrib-routing

A Node-RED node to route incoming messages based on their topics.
HTML
2
star
37

cson-purified

json parser based on the cson library
C
2
star
38

node-red-contrib-deadmanswitch

Node-RED node triggering messages when nothing has been received on the input after a specified delay.
HTML
2
star
39

chestbelt

SINTEF ChestBelt Driver and Application
Java
2
star
40

thingml-paho.mqtt.c

adaptation of paho mqtt to use in ThingML
C
2
star
41

oryx-neffics

This is the Oryx editor modified for the NEFFICS EU project. >>>> Use the 'neffics' branch!! <<<< The 'master' branch is the original fork from code.google.com/p/oryx-editor. See also http://code.google.com/p/oryx-editor/wiki/SetupDevelopmentEnvironment
JavaScript
2
star
42

ebw-prototype

Shell
2
star
43

node-red-contrib-lodash-throttle

The lodash method _.throttle exposed as a Node-RED node.
HTML
2
star
44

sumo-veins-mqtt-client-linux

This project embeds ASAM MQTT Clients into the Mobility Simulation Framework of Eclipse SUMO - OmNeT++ - Veins
C
2
star
45

ThingML-SimpleDebugger

A Simple GUI for debugging ThingML programs
JavaScript
2
star
46

node-red-contrib-midi-xtouch

Easily parse and generate midi messages for the Behringer X-Touch Compact.
HTML
1
star
47

mdetools18-challenge-thingml

ThingML solution to the MDETools 2018 challenge problem
Jupyter Notebook
1
star
48

modus-library

MODUS Practice Library (EPF plug-ins)
Graphviz (DOT)
1
star
49

ai-sep-web

http://datascience.smartdataresearch.ai
HTML
1
star
50

diversiot-poc

Proof-of-concept demonstrator for DiversIoT Phase 1
Groovy
1
star
51

sensgui

Desktop GUI for multiple wireless sensors
Java
1
star
52

bvr.modelbased.net

HTML
1
star
53

autorealspl

Java
1
star
54

SIS-Framework-Deployer

Manage the deployment of a fleet of SIS-Framework
JavaScript
1
star
55

SkyTrack

For task T1.3
Java
1
star
56

thingml-coap.c-client

thingml-coap.c-client
C
1
star
57

jasm

Java State Machine
Java
1
star
58

covid-19-data-pipeline

Pipelines for downloading, processing and conversion of CoVid-19 related datasets to different formats and data models.
Shell
1
star
59

thingml-xpath.c-value

C
1
star
60

sensapp-android-client

A client application for SensApp-Android collecting data from sensors available on smartphones and tablets
Java
1
star
61

mobileMaster

HTML5 Master version for the Bridge Project
TypeScript
1
star
62

yetAnotherPanelsLibrary

Simple HTML5 panels library
TypeScript
1
star
63

proasense-storage

The storage component for the Sensing Architecture developed in the ProaSense project.
Java
1
star
64

CORAS-The-Explorer

Web application for teaching CORAS
HTML
1
star
65

EmergencySituationSimulator2014

Simulate emergency situation using random numbers
C#
1
star
66

ditto-agent

Ditto agent for Raspberry Pi
Python
1
star
67

MQTT_SUR40

Broadcast input events from a PixelSense table (SUR40) to a MQTT message broker.
C#
1
star
68

GenAI4ATD

Exploring Architectural Technical Debt and explaining them using GenAI
Python
1
star
69

trust-agent

Docker-based trust agent
Dockerfile
1
star
70

ditto-fleet

Digital twins with Eclipse Ditto
JavaScript
1
star
71

reador-node-client

Reador.net Node.js client
TypeScript
1
star
72

node-red-contrib-datawarehouse

Data warehouse for Node-RED. In-memory key/value store emitting the full store when something changes.
HTML
1
star