I'm getting USBD_BUSY when i try to transmit sensor readings from sensor to my computer via virtual com port - stm32

I'm trying to transmit MPU6050 sensor readings to my computer via virtual comport.I'm using STM32 Nucleo F446RE. As far as i can see in debug mode there is no issue in sensor and sensor readings. Problem is I can't transmit them using USB. Are there anyone who have experienced this issue before?
In the tutorial I watched the guy can transmit sensor reading with USB port and can see them with a serial port reader program. I'm sure that there is no issue in sensor the card sees sensor. I don't know why it keeps returning USBD_BUSY.
Transmit Code I'm using

Related

How to model and simulate sensors that will send data to raspberry pi?

I am trying to establish communication between laptop and RPI. So far, I have used python and socket programming to do that. Now, instead of using actual sensors, I want to simulate sensor behavior by which sensor data can be sent from laptop to RPI.
So far I came across some options to do it:
Using IMB Bluemix IoT simulator or
Using simple python scripts to create sensor data or
Using simulink sensor models
Can anyone give me a better idea or any comment about these options please?

How can I stream Kinect V2 tracking data from PC to Raspberry Pi 3 through WiFi?

I'm currently working with Kinect v2. I can do all sort of stuff on PC with it. What I want to do next is, to get the data I want on PC and control the Raspberry Pi with that data (for example, I will move the Pi with motors when I tilt my head to right). I have sorted out the motors and everything but I just don't know how to use that tracking data I have on PC to control the Pi.
I hope the question makes sense, i'm just extremely new to both Pi and Kinect.
Thanks for the help!
The first step is to choose the bus that will connect the
PC to the Raspberry PI.
Your options are:
Serial bus: Pi Serial tutorial,USB Serial to Pi cable
Network Socket (cable/wifi): Socket client/server c++ examples
i2c: i2c windows PC, Configuring i2c on Pi
I believe that the i2c or serial bus will be the easiest to start
with. But in the end all 3 options need to set up the connection, and send and receive bytes / byteArrays.

rs232 to ethernet converter connection issue with Atmel board

we are doing a project for receiving data from a device using a RS232 to ethernet converter (gridconnect net 232+) onto to a Atmel board. When we connect the converter to the PC, we are getting the output but not when connected to the microcontroller board. We need to know if there has to be some network confirguration to be done on the converter in order to receive it on the microcontroller.
Thanks !
I haven't worked with that board or device, but with any RS-232 communication channel you should check that all RS-232 parameters are set up correctly on both sides. Databits, stopbits, parity settings, etc. Even one setting being off will completely stop RS-232 communications.
Once that is done, I'd hook up a terminal emulator of your choice to simulate the microcontroller side and make sure that you're getting the right traffic from the Ethernet side. You might get lucky at that point and everything might start working. ;)

How to upload an Arduino source code to a Lilypad Arduino?

I bought a Lilypad Arduino, for which an FTDI socket is required to connect to my PC. The first socket I tried on didn't power up the Arduino, because of some hardware damage. Thus, I got another socket, but with 4 female pins (Vcc, Gnd, TX, RX), unlike the previous one that had 6 male pins. Let's call the second socket as X. With X, the Lilypad is getting powered up through USB cable. Then, when I tried to upload my source code the first time, it started working.
But when I uploaded it some time later, an error called 'programmer is not responding' occurs always, which I'm unable to resolve.
What should I do?
To program an Arduino (and Arduino-compatibles), you need an FTDI adapter that has an RTS pin, as well as the Vcc, Gnd, TX, and RX pins.
The RTS pin connected to the reset circuit on the Arduino, putting the bootloader into programming mode for a few seconds.
You may be able to get it to work by resetting the Lilypad with it's reset button, then upload your sketch within a few seconds after the reset. Alternatively, or for the least hassle, get an FTDI adapter with all the needed signals. I recommend Adafruit's FTDI Friend.

MATLAB USB HID data receive

Is there a way to receive the data sent over USB to PC using HID protocol in MATLAB? I tried the host hid receiver block found in STM32 blockset in Simulink but it gives an error saying that STM32 device not found so I guess that blockset is spesific for a STM32 device.
Under Linux, you can read from /dev/input/mice. It covers position data and clicks. You might need to adjust the reading privileges of the device file.