Processing IDE

Is this the right place for this topic?

This is my first time playing around with Processing IDE. By my understanding, it is a more graphic based approach for Arduino. And for me to connect my project to my laptop (i.e. to be able print 'W' in Microsoft word) I need a combination of Arduino Programmin ( basic code), Bluetooth ( transmit data) and Processing IDE (?).

This is an example code that I got online. What is meant by ellipse?? And since the values from arduino exceed 30 (the value is 600), can I just change the set value in Processing ?

  value0 = map(read0, 0, 680, 0, width);
  ellipse (value0, 300, 30, 30);

All help is greatly appreciated

I'm not really understanding what your trying to achieve. Can you please outline exactly what your trying to do as you may not be using the best approach.

Some confusion here I think.

Processing is a program that runs on the PC and I believe that it is programmed using Java. You cannot program an Arduino using Processing. For that you need to use the Arduino IDE(other IDEs are available). If you have questions about Processing then this Arduino forum is probably not the best place to ask.

All you need to do to send a 'W' to Word is a HID capable Arduino such as a Leonardo which can emulate a keyboard so you can send anything you like to the PC within reason. If you want/need to use Bluetooth then you can do that with any Arduino but will require a program running on the PC to receive, interpret and pass on values received. I assume that Processing can do that but do not know for sure.

What is meant by ellipse?

That looks like a call to a function to draw an ellipse on the screen using the parameters passed to it

Details of what you want to do would help enormously

Mostly a duplicate of that UKHeliBob answered while I was writing it, but there are some differences so I'll post it anyway:

Izzy13:
By my understanding, it is a more graphic based approach for Arduino.

That's wrong. The Processing IDE is used to write programs that run on your computer. If you like, you can make these Processing programs interact with a separate program that's running on your Arduino board. That Processing program could provide a graphical interface but actually writing the Processing and Arduino programs will not be graphical at all. There are visual programming plugins for Arduino like ArduBlock and others. Those have nothing to do with Processing.

Izzy13:
i.e. to be able print 'W' in Microsoft word) I need a combination of Arduino Programmin ( basic code), Bluetooth ( transmit data) and Processing IDE (?).

You could do it that way if you like. If you don't need the Bluetooth capability, it would be much more easy to use an Arduino Leonardo or Micro with the Keyboard library to emulate a keyboard and directly type the letter 'W' into Word.

UKHeliBob:
Details of what you want to do would help enormously

To simplify, I want to make a project that can sort of act as an replacement for the WASD keys for laptops. The inputs of four sensors will each respectively be corresponding towards a single key. In terms of Arduino, I have manage it so that the sensors will print each key on Serial Monitor based on set values via bluetooth.

Hence, the next step is to transmit data to the laptop. One way I thought of testing this is by seeing if I can enter WASD keys on Microsoft Words just by simply using the aforementioned sensors. I seem to be missing a link to connect between the Arduino and the laptop directly. Referring past senior projects, Processing seems to play a major part in order to achieve this.

Currently I am using Arduino Uno and HC-06.

Riva:
I'm not really understanding what your trying to achieve. Can you please outline exactly what your trying to do as you may not be using the best approach.

To simplify, I want to make a project that can sort of act as an replacement for the WASD keys for laptops. The inputs of four sensors will each respectively be corresponding towards a single key. In terms of Arduino, I have manage it so that the sensors will print each key on Serial Monitor based on set values via bluetooth.

Hence, the next step is to transmit data to the laptop. One way I thought of testing this is by seeing if I can enter WASD keys on Microsoft Words just by simply using the aforementioned sensors. I seem to be missing a link to connect between the Arduino and the laptop directly. Referring past senior projects, Processing seems to play a major part in order to achieve this.

Currently I am using Arduino Uno and HC-06.

I have manage it so that the sensors will print each key on Serial Monitor based on set values via bluetooth

What part does Bluetooth play in what you have managed to do so far ?

As mentioned above, maybe you could use an Arduino Leonardo or derivative as they can look like a HID device (Keyboard, Mouse, Joystick) when plugged into a computer.
Are the keys meant to be wireless (hence the use of Bluetooth) or are you hoping to use that as a method of getting the key presses into the PC and then use Processing to act on them?

UKHeliBob:
What part does Bluetooth play in what you have managed to do so far ?

Currently I am just using it as an ON button for my project. My plan is once I figured out how to connect to the laptop I will then use it transmit data

Riva:
Are you hoping to use that as a method of getting the key presses into the PC and then use Processing to act on them?

Based on my current understanding this is the only method that I know of.

Riva:
Are the keys meant to be wireless (hence the use of Bluetooth)

Is there anyway to get it to be pressed into the PC wirelessly without the use of Processing?

You really haven't ever answered the question of whether you actually need the wireless feature.

Izzy13:
Is there anyway to get it to be pressed into the PC wirelessly without the use of Processing?

Yes. You need some program on the PC that receives the serial communication from the Arduino and then does the appropriate keyboard emulation. You could write that program in any number of languages, or even use something pre-made like AutoHotkey or EventGhost.

However, Processing is probably a reasonable choice.

The reason we're hounding you to answer the question about whether you need wireless is because this is much easier to do with a Leonardo or similar Arduino board plugged into your computer with a USB cable. In that case, you only need to write a simple Arduino sketch and don't need any special program running on your computer.

pert:
The reason we're hounding you to answer the question about whether you need wireless is because this is much easier to do with a Leonardo or similar Arduino board plugged into your computer with a USB cable. In that case, you only need to write a simple Arduino sketch and don't need any special program running on your computer.

Please, all your help is greatly appreciated

pert:
You really haven't ever answered the question of whether you actually need the wireless feature.Yes.

I'm sorry, I did not realize. Yes, the wireless feature will greatly help

pert:
You could write that program in any number of languages, or even use something pre-made like AutoHotkey or EventGhost.

Thank you very much for your suggestion. However, will these pre-made program such as AutoHotKey can be loaded unto the Arduino. Or will it just be a seperate program entirely. The reason I ask is that it will be rather annoying if each PC must be required to be installed with said program.

If you plug the Leonardo into the laptop and it connects to the keys using some wireless standard or maybe get a Bluefruit EZ-Key if you can (discontinued) and just pair it with the PC and connect some keys.

Thank you very much for your suggestion. However, will these pre-made program such as AutoHotKey can be loaded unto the Arduino. Or will it just be a seperate program entirely. The reason I ask is that it will be rather annoying if each PC must be required to be installed with said program.

None of these programs is loaded on the Arduino. Nor is Processing; they are all programs run on the PC.
The only thing on the Arduino is your sketch.

evanmars:
Nor is Processing; they are all programs run on the PC.

May I ask what does this line mean then?

import processing.serial.*;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.io.IOException;
import cc.arduino.*;

Arduino arduino;

According to past projects, this line code is detecting whether there is arduino available in any of the port of the PC.

May I ask what does this line mean then?

The code that you posted runs in Processing on the PC, not on the Arduino

How does that conflict with

Nor is Processing; they are all programs run on the PC.