jarduino

Java based Microcontrollers? [closed]

二次信任 提交于 2020-07-17 06:16:47
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . Improve this question I have been looking into micro-controllers and was wondering if the majority of them are C/C++ based? I am quite proficient in java and want to ask you guys if anyone knows of a good cost efficient, java-based micro-controller I could look into. All answers are

Control an Arduino with Java

社会主义新天地 提交于 2019-12-17 22:19:40
问题 I am looking to turn an LED on and off with a Java program. I did the project in C# in roughly 5 minutes, but it seems to be somewhat more challenging in Java. I had the Arduino wait for a 1 or 0 to be written to the COM port and would change the LED based on that. The code I am using for the Arduino is as follows. int LedPin = 13; char data; void setup() { Serial.begin(9600); pinMode( LedPin , OUTPUT ); } void loop() { data = Serial.read(); if (Serial.available() > 0) { if(data == '1' ) {

Control an Arduino with Java

*爱你&永不变心* 提交于 2019-11-28 18:26:11
I am looking to turn an LED on and off with a Java program. I did the project in C# in roughly 5 minutes, but it seems to be somewhat more challenging in Java. I had the Arduino wait for a 1 or 0 to be written to the COM port and would change the LED based on that. The code I am using for the Arduino is as follows. int LedPin = 13; char data; void setup() { Serial.begin(9600); pinMode( LedPin , OUTPUT ); } void loop() { data = Serial.read(); if (Serial.available() > 0) { if(data == '1' ) { digitalWrite(LedPin,HIGH); } else if(data == '0' ) { digitalWrite(LedPin,LOW); } } else if (Serial