Wireless programming with the Arduino XBee Shield and XBee Explorer - ide

I am trying to enable wireless programming of an Arduino via the XBee Shield and an XBee Explorer. I've seen two tutorials online, XBee radios and Wireless Bootloading for ATmega168/ATmega328 that show you how do it.
However, both tutorials talk about using components to connect the receiver XBee to the Arduino. Well the XBee Shield handles the communication between the receiver XBee and the Arduino, so the extra components aren't necessary (or are they). They talk about using a capacitor or transistor to be able to wirelessly reset the Arduino. Is this already possible with the XBee Shield, or is there some modification I can make to it to make it possible?
How can I use the existing Arduino IDE to program my Arduino wirelessly?

You are correct in the fact that the extra components are needed to reset the Arduino wirelessly and you do need them even if you are using the Xbee shield. I'll assume that one of the tutorials that you were reading was this one. What you are going to want to do is read over the tutorial and build the transistor/capacitor/resistor circuit into a little ball (similar to this) or on a piece of prototyping board with the three signal wires coming out. You need to solder the "Reset signal from XBee" to the D3 pin on the shield which should be labeled (or it can be found on the Datasheet). Then you will have to figure out a way to connect the reset to the reset pin on your Arduino, and the ground to either device (because they should be connected by the shield). This can be as simple as sticking the wire into the sockets on the Arduino. After you do this and setup the environment as per the previously mentioned tutorial, you should be good to go!
If you do have any questions, feel free to ask, I should be able to help.

Related

Bluetooth module disconnect - arduino

I am working on a project on Arduino in which i require to blink LED when Bluetooth module is disconnected and switch off LED when it is connected.
Instead of LED, a buzzer can also be used.
Is there any code to do it
There is a similar discussion going on here also a demo code listed at the end. Below is some information to go ahead and program.
I don't think Arduino can see the connection but it might be able to be told.
The bluetooth is just a serial device at the other end of the cable, Arduino doesn't know what it is, doesn't know if it is doing anything, and doesn't care either. It can be programmed to listen for data but it wouldn't know if a deafening silence means nobody wants to say anything, or simply that bluetooth is disconnected.
Bluetooth does know when it is disconnected, and typically flashes an LED to that effect. It therefore follows that the signal for the LED can sent to a pin on Arduino, which might be sufficient for you to do what you want to do.
There are several tutorials about Bluetooth by Arduino , check if you can tap any communication update in arduino and pass it to the out pin in arduino and display on LED.
Also this link talks about controlling LED by Bluetooth.

STM32F7 Discovery - where are the LEDs?

I am learning about ARM development on my STM32F7 Discovery Kit (w/ STM32F746NGH6 Microcontroller) and I'm trying to write a "blinky" program without using high level libraries.
Reading the documentation, I couldn't figure out which MCU pins are all those onboard LED's connected to? What is the right document to check?
Looking at the board I can see some LEDs (LD1, LD2, ...), but how can I reach them in program? I don't see them in header files and if they are controlled via GPIO pins, how to I know which ones?
In the user manual there's no mention of any LED, except in the electrical schematics (where none of the LEDs is connected directly to the MCU afaik- they serve mostly as hard-wired board status indicators).
Is it possible that an advanced board like this doesn't have a single general purpose LED on it?
From the schematic in that document, it looks like you should be able to use LED LD1 on PI1 (GPIO port I pin 1).
Download the STM32CubeF7 software package. It should include a blinky program example specifically for your board. Then see which LED/pin they use in the example program.

How can I read SPI (Serial Peripheral Interface) data sent by a microcontroller on Windows

I'm working with an Atmel ATMEGA328P microprocessor that is writing debug information out the MOSI SPI pin. Is there a way to wire a connection to a Windows computer so I can see the debug information?
Ideally, there would be a breakout board or something that can be purchased that would allow me to run wires from the microcontroller's SPI ports to the board and then the board would have a USB connection so I can connect to my computer. I've searched and nothing is coming up, but maybe I'm not using the right terms.
If a connection is possible, any references to code or an existing program for reading this data would really help.
By the way, the USART pins are already being used by the microcontroller for communicating with another device, otherwise I would've used them with a FT232R breakout board.
You need an SPI adapter. SparkFun has a cheap one for sale. If you have an Arduino or another Atmega328 lying around you can set it up as SPI host and use it as a SPI-USB adapter.

Korg Nanokey MIDI Controller for Arduino?

I have a Korg NanoKey which I'd like to use to control a simple synthesizer I've designed on the Arduino platform. (I have an Arduino Uno.) Basically, I don't care about MIDI, I just want to read what note the keyboard has pressed down, but if MIDI is the only way I can do that, then it's okay with me. So my big question is, how do I do this? I haven't been able to find anyone else on the Internet who has already done this.
But more specifically, I see two challenges: First, I'd like to plug my NanoKey directly into the Arduino's USB port, but then I'm wondering if the Arduino would provide the necessary power to the NanoKey. Second, I'm not sure what protocol I would be reading. Can I just read MIDI signals as described in this tutorial?
I don't want to curb your enthusiasm but what you're attempting might be a bit hard basket. A USB system consists of a host controller and one or more peripheral devices. It's the host that controls traffic flow to the devices which means that devices can't transmit data on the bus without an explicit request from the host controller.
I'm not familiar with either the nanoKey or the Arduino platform but I'd be fairly confident that the nanoKey is a USB "device", normally connected to a computer which would act as the host. So what you would need for this system to work is for the Arduino to act as the host when communicating with the nanoKey. The Arduino schematic shows that the Arduino Uno uses an ATmega8U2 for USB coms. Unfortunately the ATmega8U2 is a USB device, so you've got two peripheral devices but no host controller to facilitate the transfer of data between them. You'd be better off using a development board for a micro that provides either USB Host or USB On-the-Go.
I opened up a Korg Nano controller yesterday and was surprised to discover that there's an AVR mega32 inside. It would be a significant undertaking, but with a bit of work you could probably work out the schematic and reprogram it yourself using their programming header breakout. You might not end up with much more functionality than you've got this other way, but it would be very educational.
I agree with the Jono - you are biting off a lot - it might even end up easiest to hook the keys up to the Arduino directly - tearing out the electronics and figuring out a way to multiplex the keys into a single channel without losing polyphony (resistor 'ladder' maybe). I any case, good luck. Amusingly, you'd making an analog keyboard to plug into a digital synthesizer.
Quick and Dirty Arduino MIDI Over USB demonstrates how to send/receive MIDI out over USB, but unfortunately, this probably isn't any help for what you are trying to do, since he's found a way to send and receive MIDI signals from a USB host, not act as a USB host himself - the opposite of your problem. However, I thought perhaps it would be of use, if you ever wanted to control your device from a computer.
As mentioned in the other posts, you would need to use a separate chip to provide the USB Host interface. Here's a great guide to using the USB Host shield by Circuits#Home to interface with an Akai LPK25 (USB Midi Keyboard).
http://blog.makezine.com/2010/11/30/usbhacking/
The Arduino sketch is provided, so you should be able to try it out, however debugging the USB Host connection could get tricky real fast if it doesn't work out of the box.

Arduino project using infrared sensor and usb communication

I am planning on doing a small arduino project and would like to know if what I'm thinking would work with a regular arduino board. I'm thinking of buying an Arduino Uno for my project, along with an IR LED and an IR sensor. So here's what I want to go with this:
I want to point the LED towards the sensor, so that the sensor is always detecting light. Then', I'll start "cutting" that light (say, with with my hand) several times. I want the arduino program to time the intervals between the times the light is "cut" and send these times to my computer via USB, so I can process this data.
I've seen many people talk about serial communication between an arduino board and a computer, but I'm not sure how that works. Will it use the same usb connector I use to upload programs to the board, or do I have to buy anything else?
EDIT: tl;dr: I guess my question, in the end, is twofold:
1) Am I able to "talk" to my computer using the built-in USB connector on the board, or is that used solely for uploading programs and I need to buy another one? and
2) Is this project feasible with an Arduino Uno board?
Thanks for the help!
Yes, your project is very feasible.
You use the built in USB connector to both program the device and communicate with it. Check out some examples on the Serial Reference Page
For reading the sensor, you'll want to use either a digital or analog input. For a digital input, you'll likely have to external components to control the light threshold, but it will provide a simple yes or no if something is in front of it. With an analog input, you can use a threshold in code to determine when your hand passes.
Timing can either be done on device with the Millis() function or on the connected computer.