Accepting wireless data

Hello,

How can Arduino on my computer accept data from a microcontroller wirelessly?

I have two Adafruit microcontrollers which have Bluetooth and Wifi modules respectively, and I don't know how to transmit data to the Arduino serial plotter.

You really need to tell us more about your project.

My background is in TCP/IP and WiFi is nuts and bolts to me.

(Bluetooth not so much).

Tell us more.

Thank you for replying.

My background is in nothing, I am quite inexperienced.

My project:
-I have an Adafruit Bluefruit and an Adafruit Wifi microcontroller
-I have an IMU sensor

-I would like data from the IMU to be sent to my computer so that Arduino Serial Plotter can plot it. I would like this to be done without having my microcontroller plugged in to my computer. I don't know what to implement in Arduino code so that it can receive this data wirelessly (either through Bluetooth or wifi, whatever is easier).

Please let me know if you need any more info.

cookedrobot:
I don't know what to implement in Arduino code so that it can receive this data wirelessly

You haven't said that you have an Arduino device anywhere though....

cookedrobot:
I don't know how to transmit data to the Arduino serial plotter.

That has to be a Serial.print into the PC's USB. To do that wirelessly you could use two Pololu Wixels, which is basically a wireless USB. I had a project where I had one Wixel at the PC plugged into USB, and the other on an Arduino-based robot, wired to the Arduino on a software serial port. Arduino communicated to its own Wixel, which wirelessly spoke to the other Wixel, which in turn was seen on the PC's USB on some or other COM port.

Hello,

Even though I am using an Adafruit microcontroller, I am still using Arduino IDE to write the code.

Thank you for the suggestion of Pololu Wixels. I would like to know what can be done with my existing setup, a microcontroller that has a wifi module and a microcontroller that has Bluetooth.

I cannot find any existing example code, but I am wondering if anybody has tried this before.

I would like to know what can be done with my existing setup, a microcontroller that has a wifi module and a microcontroller that has Bluetooth.

Please read the "How to use this forum" post for suggestions on how to get helpful responses.

Among those suggestions will be to post links to the exact items that you have on hand and would like to use in the project. The phrase "a microcontroller" tells us nothing.

cookedrobot:
Hello,

Even though I am using an Adafruit microcontroller, I am still using Arduino IDE to write the code.

Thank you for the suggestion of Pololu Wixels. I would like to know what can be done with my existing setup, a microcontroller that has a wifi module and a microcontroller that has Bluetooth.

I cannot find any existing example code, but I am wondering if anybody has tried this before.

Lets take one step back.

Do both devices have WIFI and Bluetooth?

The way I am reading this is one has Bluetooth, and one has WIFI. If they both have WIFI and or Bluetooth, many examples exist on how to send and receive.

As I previously mentioned, I have an Adafruit Bluefruit and an Adafruit Wifi microcontroller, they are both Feather M0 boards. Yes one has Bluetooth and the other has WIFI.

I would prefer to use Bluetooth. I have looked at the forums but have not found anything relevant to wirelessly sending data to my computer so I can use the Serial plotter on Arduino IDE. I am new to this so may not know where to look. Could someone redirect me to these many examples that exist on how to send and receive?

cookedrobot:
As I previously mentioned, I have an Adafruit Bluefruit and an Adafruit Wifi microcontroller, they are both Feather M0 boards. Yes one has Bluetooth and the other has WIFI.

I would prefer to use Bluetooth. I have looked at the forums but have not found anything relevant to wirelessly sending data to my computer so I can use the Serial plotter on Arduino IDE. I am new to this so may not know where to look. Could someone redirect me to these many examples that exist on how to send and receive?

First, you will need to have the same type of device at each end. Decide Bluetooth or Wifi. Once you have decided that, we can help point you in a direction.

AS far as I know, you can not send bluetooth to a WIFI and can not send WIFI to bluetooth without some type of bridge.

I do not care what to use, whatever gets the job done.

Lets say I choose Bluetooth. I don't know what to put in my code in Arduino on my computer so that I can receive data from the Adafruit Bluefruit Feather M0 microcontroller. This is where I am looking for help.

Right now I have code that takes the X,Y,Z accelerations from an IMU and displays them to the Serial Plotter WHEN the Adafruit Bluefruit is plugged into my laptop.

I know how to send data, I can do it with the Adafruit Bluefruit companion app. How can I RECEIVE data on Arduino IDE (on my computer)? What functions are used etc

cookedrobot:
How can I RECEIVE data on Arduino IDE (on my computer)? What functions are used etc

There are no functions to do that, not at the PC end anyway, assuming that by IDE you mean the monitor/plotter. If you open the serial monitor or serial plotter, they listen on USB COMx where the Arduino is connected. You send from the Arduino or whatever device over the USB, and you're already doing that it seems, with wire:

cookedrobot:
Right now I have code that takes the X,Y,Z accelerations from an IMU and displays them to the Serial Plotter WHEN the Adafruit Bluefruit is plugged into my laptop.

That's why I suggested Wixels, where the Wixel is wireless USB.

I do exactly that with an M6050 gyro... Arduino Micro has M6050 on I2C, Wixel on Serial1. Micro's sketch prints data to Serial1, the Wixel, which zaps that out wirelessly to the other Wixel at the PC. That Wixel is plugged in on the USB and is seen as COMx to Windows. That could then just appear in the serial monitor, although I actually use Processing to display ala the well known so-called "teapot" sketch.

How can I RECEIVE data on Arduino IDE (on my computer)?

Use the Arduino to receive Bluetooth transmissions, and use Serial.print() to send the received data to the PC.

Here is a link to show how this can be done.

Romonaga:
Here is a link to show how this can be done.

Bluetooth Comm for Arduino and PC - TechBitar

OK well well well we live and learn. I have often noticed extra ports in the Arduino Tools / Port list (COM 10 and 11 as I write this) and didn't know what they are. I realise now they're Bluetooth, although nowadays its built in not the dongle as in that link. If I select one of those ports I can indeed open the serial monitor or plotter on that port. (Not connected to anything, so not seeing anything, but with BT turned off, the ports disappear.)

PuTTY opens the BT port correctly too.

It would never have occurred to me in a million years to try that, k++ for the link.

So yeah that should be good for what the OP wants.

side note1: I accidentally bought one of those BT daughter boards as in the link, not a proper module. What a pain in the arse....

side note2: How old is that blog post? Uno R2? BT dongle?

Hal_Posoyan:
side note2: How old is that blog post? Uno R2? BT dongle?

Not sure how old it is. But the information contained should be relevant or at least point OP in the right direction.

Romonaga:
But the information contained should be relevant or at least point OP in the right direction.

I'm quite sure: as I said, if you turn BT on in Windows, the IDE's monitor or plotter both open on the BT port. If BT's off, the ports aren't in the list. So seems reasonable that if anything comes in from a paired BT device, the monitor or plotter will be happy to output it.