Comments (8)
Yes, although we haven't explicitly tested that configuration. You will need to tell Firmata to use Serial2 instead of the default Serial. Update your StandardFirmata sketch as follows:
locate this line in setup():
Firmata.begin(57600);
and change it to the following:
Serial2.begin( 57600 ); //use your Bluetooth device's baud rate here. Must match the device
Firmata.begin( Serial2 );
from remote-wiring.
@turkycat, thanks for your reply! I changed the Arduino sketch as suggested - but with no effect.
I use a HC-06 Bluetooth module and it stops blinking when the App is connected to the Arduino. But when I try to do arduino.digitalWrite(53, PinState.LOW); (Pin 53 is where an LED is connected).
from remote-wiring.
What happens when you try the above? I think you left your reply unfinished. It does sound like your device is getting a connection, but these types of problems are hard to debug. Try hooking up another led to a different pin and modify your sketch to turn that led on when the digital write callback is invoked. If that doesn't light, try turning it on at earlier and earlier points until you can find the point of failure
from remote-wiring.
@turkycat Thanks again for your advices. My current setup looks like this:
The Arduino DUE setup:
Opened StandardFirmata example and changed setup() like tihs
Serial2.begin( 57600 ); //use your Bluetooth device's baud rate here. Must match the device
Firmata.begin( Serial2 );
// Setup DigitalPin 53
pinMode(53, OUTPUT);
digitalWrite(53, HIGH); // Start with LED on
That's all on Arduino side.
In Visual Studio I followed the instructions here: https://ms-iot.github.io/content/en-US/win10/SetupPCWRA.htm
Then connect to Arduino like this:
connection = new BluetoothSerial("HC-06");
connection.begin(57600, SerialConfig.SERIAL_8N1);
arduino = new RemoteDevice(connection);
And implement a Button to set Pin 53 to LOW:
private void button1_Click(object sender, RoutedEventArgs e)
{
arduino.digitalWrite(53, PinState.LOW);
}
A I mentioned earlier, the HC-06 module stops blinking but I can not set Pin 53 to low.
I also used a Bluetooth-Terminal for windows to send Strings via Bluetooth-Com-Port to arduino. I can see the incoming strings on Arduino when I open the Serial Monitor, so bluetooth seems to work fine. I did some other small projects and sent commands via Com-Port, but in this case I would like to use the Firmata benefits :)
Thats my status quo.
from remote-wiring.
I've ordered an HC-06 device so that I can test your setup. In the meantime, I noticed that the device that I ordered has a default baud rate of 9600. Yours may be different, but if the HC-06 is not configured to use 57600, it will not work with the setup you currently have. Have you checked with the Bluetooth device's documentation to verify that either 1) the default baud rate is 57600 or 2) you have gone through the necessary steps to change the baud rate to 57600?
from remote-wiring.
Some days ago I have tested a second setup (HC-06 on Arduino UNO's Serial port) with baud rate 9600 and it works fine. I have changed the DUE (Serial2) setup to 9600 but it still dont work (no blinking RX when I try to send data). Do you have a running setup with HC-06 on SerialX?
Please also let me know if you need additional hardware, maybe I can ship it to you so you don't have to order (and pay) it.
from remote-wiring.
No current setup with HC-06, but I will try when it is delivered to me. I have successfully used SerialX instead of Serial
in other sketches with no problems, I've even written my own Stream
classes (like Serial
) and used them in place of Serial
from remote-wiring.
Closing Stale - No post from originator or owner in more than a year.
from remote-wiring.
Related Issues (20)
- "AnalogWrite" with incremental delay after using "sendSysex" HOT 3
- CPU core is fully utilized after calling Firmate.begin() HOT 1
- Xamarin Support HOT 1
- Multiple Arduinos (RemoteDevices) HOT 2
- Arduino Mega not working with WRAE HOT 5
- Win 10 suppport HOT 1
- remote-wiring in not compatible with Arduino Mega HOT 2
- RfcommDeviceService null exception HOT 1
- Could not install package 'Windows-Remote-Arduino 1.4.0 HOT 4
- Analog Write Doesn't work in v1.4 HOT 2
- Raspberry PI 3 HOT 1
- AnalogRead error HOT 2
- DHT11 + Arduino UNO + Raspberry pi 3 + Win10iotCore HOT 1
- Code issue
- UsbSerial apparently doesn't connect to my Arduino Uno HOT 1
- c++/winrt support? HOT 1
- Microsoft.Maker.Serial is empty HOT 1
- StringMessageReceived event not always firing HOT 2
- IS this working forVIsual Studio HOT 1
- Bluetooth problem between Arduino device and laptop. 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 remote-wiring.