How to communicate to HC 06 Bluetooth with Nucleo ST F410RE - bluetooth

I have a HC06 bluetooth module and recently I got my Nucleo ST F401RE arduino compatible mbed board. I want to have a communication between Nucleo board and HC06 bluetooth module. Is it possible?

First of all, what Nucleo board you use? F401RE or F411RE
Basically, HC06 is controlled through UART communication.
First step you have to do is connecting UART pins between HC06 and Nucleo.
UART pin connection:
HC06 GND -- Nucleo GND
HC06 TX -- Nucleo RX
HC06 RX -- Nucleo TX
For Necleo side, you can use UART1 freely.
You cannot use UART2(D0, D1) because it is shared with USB serial.
UART1 RX pin: D2
UART1 TX pin: D10
You can create instance of Serial class like following.
Serial uart1(D10 /* TX */, D2 /* RX */);
Beware of voltage difference between HC06 and Nucleo.
The core voltage of Nucleo is 3.3.

Related

How to use the mdio-bitbang, mdio-gpio linux driver to read phy register

I want to read the phy register using mdio mdio-bitbang, mdio-gpio linux driver. The phy is connected to the gpio pins (10, 11) on the mpc8308 controller and it complies to the mdio specification of IEEE 802.3 Clause 45 but it is not a ethernet phy.
What should be the node entry in the dts fie and how do I access the phy registers from the linux userpsace. I am using a pretty old kernel 2.6.29.

Atmel Atmega32u4 is not working, short-cirquit...?

I have a problem with Atmega32u4(QFN44 package).
This is my first custom board, I've been using arduinos.
Problem:
VCC -> GND +-430ohm
When connected to 5V heating up(short-cirquit)
There isn't any direct short circuit.
Schematic:
Schematic
Board:
Board

Getting Input from electret microphone max4466

I want to get input from an electret microphone on the raspberry pi 3 in python 3. The electret microphone is max4466 from Adafriut. VCC is plugged into 5.ou, GND is plugged into GND, and OUT is plugged into GPIO 11. I have GPIO 11 set for input, but all I get are 0's. What should I do to get input?
The MAX4466 is an amplifier with analog outputs, not digital ones and zeroes. The GPIO pins are purely digital and can't accept an analog input. In order to digitize the output from a microphone, you need to hook it up to an analog-to-digital converter (ADC). Adafruit sells little ADC boards to help you do this. The ADC digital output would hook up to your GPIO on the Raspberry Pi.
Here's a link to learn about ADCs from Adafruit:
https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/overview

lpcxpresso UART and DMA

Does anybody have experience with the UART and DMA on the 1769 lpcxpresso board without the baseboard? I can get it to transmit the FIFO buffer but I am not able to get it to acknowledge any received chars. If it matters I am using the MCB1700, DMA-UART example code. Is there any place where I can get code examples to get this to work?
I am using the MCB1700 example code which comes with the lpcxpresso code_red. This uses UART0 and UART1 thru a RS-232 cable and 2 DMA channels. but the RS232 connection to connect the 2 ports is on the baseboard but I don't have one. I am just using wires on a breadboard to hook up UART0 TX to UART1 RX and the UART1 TX to the UART0 RX. I am notified that I received the 16 byte FIFO buffer from UART1 but when UART0 transmits to UART1, I am not getting the flag set saying I received the characters on the other DMA channel. I am wondering if something is not being initialized correctly

How to retrieve data from an i2c device over usb in linux

I have a temperature sensor, which is connected using an USB-I2C adapter (http://www.robot-electronics.co.uk/htm/usb_i2c_tech.htm)
I attached this device to my linux computer (suse10).
I typed dmesg and saw
usb 3-3: new full speed USB device using ohci_hcd and address 10
usb 3-3: new device found, idVendor=0403, idProduct=6001
usb 3-3: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-3: Product: FT232R USB UART
usb 3-3: Manufacturer: FTDI
usb 3-3: SerialNumber: A7007K93
usb 3-3: configuration #1 chosen from 1 choice
ftdi_sio 3-3:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT232BM
usb 3-3: FTDI USB Serial Device converter now attached to ttyUSB0
But I have no idea how to read the current temperature.
updated 1: Actually the I2C bus can attach up to 127 sensors. But I have no idea how to list the addresses of available sensors.
Can anybody give me some hints? Thanks in advance
Your adapter allows you to send I2C commands over a virtual serial port. A serial port has been created for you. You need to open it and send commands to it. The commands are specific to the device you are connected to. See the example in the link you provided to get an idea.
It is hard to give you correct instructions without a datasheet. Most probably your device will use one byte address and the read procedure is as follows:
[I2C_AD1] [Device I2C address + Read bit] [Device Address register] [Number of bytes to read]
0x55 0xXX 0x00 0x01
You need to send 4 bytes to the serial port. The first one instructs the USB to I2C converter to send a read command. The second one is the address of the device attached to the I2C bus. I2C devices use 7-bit addresses (0-127). Usually these are given with one bit shifted at the left. Therefore you need to scan these addresses (iterate from 0 to 127, shift left one bit, set bit0 to 1):
([0x00 - 0x7F] << 1) | 1
Since we don't have a datasheet I can't tell anything about the last two bytes. You could try to use dummy values. If a device is attached to the scanned I2C address, it should reply with a NACK to an attempt to read a non-existing register. Read commands sent to an I2C address that doesn't correspond to an actual device should be ignored.

Resources