Controlling adafruit FM transmitter via the serial port

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
electronaut
 
Posts: 21
Joined: Wed Aug 20, 2014 6:25 pm

Controlling adafruit FM transmitter via the serial port

Post by electronaut »

Hello,

The adafruit FM radio transmitter (Si4713) works great, and the
adafruit RTL-SDR/SDR# receiver complements this product nicely.
So far all of my testing has been done using a Windows 8.1 laptop.
I have been able to broadcast with my Arduino UNO tethered to
the USB port, or with the Adruino powered by a 9V battery (after
uploading the adafruit radio sketch via USB).

Question: Is it possible to control the radio transmitter via the
serial port using Firmata or some variant of Firmata that works
with adafruit's library? Specifically, is it possible to control the radio
from a program compiled from C++ on the PC side by using a
library that talks to the Arduino board/Si4713 via the serial port?

So far the examples I have seen require changing the sketch and uploading
the result using the IDE, instead of changing the behavior of an already
running transmitter via the serial port.

Thank you.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Controlling adafruit FM transmitter via the serial port

Post by adafruit_support_rick »

There's no reason why you couldn't write a PC app and a matching Arduino sketch to control the radio. Just come up with a set of commands you can send from the PC over serial, and write a command parser on the Arduino side.

User avatar
electronaut
 
Posts: 21
Joined: Wed Aug 20, 2014 6:25 pm

Re: Controlling adafruit FM transmitter via the serial port

Post by electronaut »

What is the role (if any) of Firmata in the strategy that you suggest?
My understanding is that Firmata is a sketch that does some of the parsing that you speak
about, facilitating communication between PC and microcontroller (over serial port) in
a standardized way. Would it make sense to start with the Firmata sketch and modify it
as needed for the radio controller? Thanks.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Controlling adafruit FM transmitter via the serial port

Post by adafruit_support_rick »

You can use Firmata. That implements the basic communications protocol. You would transmit command strings via Firmata, but you would still have to parse them to extract the radio commands. Firmata itself only supports digital and analog pin I/O.

User avatar
electronaut
 
Posts: 21
Joined: Wed Aug 20, 2014 6:25 pm

Re: Controlling adafruit FM transmitter via the serial port

Post by electronaut »

If I understand correctly StandardFirmata just provides a skeleton for the kind
of interface we have been discussing (PC <-> Arduino <-> radio chip), and it would
have to be extended to support the radio chip. I have seen Firmata described as
"firmware," in contrast to standard sketches, often described as "software." But the
reality is that both are sketches, so you cannot upload a toy sketch that blinks
LED's and the firmata sketch separately: the blinking code would need to be
merged with the Firmata sketch before it is uploaded. After the sketch is
compiled, uploaded and running on the Arduino, the LED's can be controlled
from the PC side through the interface provided by Firmata.
Is this correct? Thanks!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Controlling adafruit FM transmitter via the serial port

Post by adafruit_support_rick »

Yes. You need to implement the Firmata callbacks and protocol routines as an integral part of your sketch. The example sketch on the Arduino site illustrates this
http://arduino.cc/en/reference/firmata

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”