This semester I have a project where I need to send data from my microcontroller to my PC and read/interpret its data. We are doing this using an ftdi cable and using matlab to read the data.
I would like to know if there is a way that I can see if my matlab code works that doesn't involve me going to the lab to test it. That is, if there is a way to simulate receiving data in a USB port of my computer so that I can test if my code is working.
Thanks in advance
Related
I am working on edge computing for IoT applications and expected to create a system that acts as a near edge computer with the use of a raspberry pi hooked up to a dht11 sensor. How do I send this data over to a computer that is at the edge? Ideally I want to use my PC as this device but I have no clue how to send this data over in real time.
So far I have created the circuit and can view the temperature and humidity readings on the raspberry pi in python. Unsure of what the next steps are - I don't want to send this data over to the cloud just yet.
Side note: I believe i may be missing knowledge regarding this but is the raspberry pi an edge device because it is hooked up to the sensor directly?
Any help is greatly appreciated.
You need to think this through a bit more. What will you do with the temperature and humidity data that you receive?
For example, if you're just experimenting and want to just see the readings in a console on your PC, you can use netcat to send the console output of your Python program from the RPi to PC. No SW development needed, they just have to be in the same network. Not particularly useful for anything else, either.
Otherwise you need to set up some client-server solution between the RPi and your PC. There's a ton of possible solutions, all depending on what you plan to do with the data. You can use MQTT, HTTP, a straight database connection (MySQL, PostgreSQL), etc. You have to supply both sides of the connection. The Python code on client side which connects and sends data; and the server side thing that accepts the samples and stores them somewhere. Plus all the networking, authentication etc.
Or you can just download the Python client libraries for your favourite cloud solution and set that up according to a tutorial. TBH, this sounds a lot less work to me.
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?
I am currently doing a project that uses this 3 softwares. Qt, Arduino Uno and MAtlab.
In my project, I was planning to use Qt to transmit an input value into Arduino in which Arduino will give a feedback in return, in which the feedback output is serially received by Matlab.
I have tried performing the serial connection, unfortunately Arduino Uno can only initiate serial connection with either one of them, and not both.
Is there any way to perform multiple transmit/received method between this Qt-arduino-Matlab serial connection?
Thank you for your time and aid
If I understand correctly, you have an Arduino device as serial port, and you want to communicate with it from Matlab and Qt simultaneously under the same host computer.
Under Windows, there seems no simple solution, unless you write some low level code to open the device with special share mode.
Under unix, you can open the serial port from Qt (it seems this works for you), and if needed, you start Matlab as sudo, so you have full control over the serial port, which allows you to open it again.
I would like to start a semester project related to Matlab Simulink and USRP devices. I am new in this field and studying regularly about it...
The first step to setup the devices is completed and now I would like to check if both device can communicate properly. For this Reason can any one suggest a simple Communication Module...
anything would be OK to start with. e.g sending text, Image, Voice, Video etc etc...
Regards
I suggest you take a look at the communications toolbox in matlab:
USRPĀ® Support Package from Communications System Toolbox
There seem to be some code snippets for simulink available as well.
BR
Magnus
Ok, so I've never done anything with serial connections before. But...
I just got an Arduino that I am trying to use to remotely launch model rockets. I have a 5 volt relay that I can control with the Arduino's digital out.
Now, I want connect my iPhone's Tx to the Arduino's Rx and vice-versa. I would buy the iPhone breakout board from spark fun so I could connect it to the Arduino. (http://www.sparkfun.com/products/10645) I was thinking something along the lines of: when the phone gets a text or a call from a certain number, or maybe even just a bluetooth signal, it would tell the Arduino. But those are just ideas.
How can I actually send a signal from my iPhone? Are there xCode libraries to do this? My phone is jailbroken, so I am open to other non-apple ways for sending signals. But I am a novice programmer.
Thank you.
P.S. I'm new to Stack Overflow, and I would appreciate if you could help me. The first time I posted a question someone told me it wasn't on the right site. So please bear with me.
EDIT #1: Haha, I just read over this and it sounds like a cell phone bomb from a terrorist movie. I swear that's not what I'm doing. Just look at my avatar.
EDIT #2: I also have a Bluetooth dongle for the Arduino. But I honestly have no idea how to interface that with anything, it was $10 from China, so I thought I would buy it to keep my options open. But, regardless, it would be really cool to plug an iPhone into an Arduino.
You could buy a Redpark Serial Cable for iOS to connect the iPhone to your Arduino board over RS-232.
This book also seems to be helpful: iOS Sensor Apps with Arduino
EDIT:
Redpark FAQ: http://redpark.com/c2db9_FAQs.html
There is a SDK available for this serial cable.
You will have trouble writing communication software when trying to connect directly to the dock connector! The External Accessory Framework wont help you here unless your Arduino board has a special decoding chip for dock connector communication.
Have fun!
All I think you need to do is utilize the External Accessory framework. I'm not sure how well it will work for you, the library is meant to communicate with MFi approved accessories. I'd really like to hear how your results went, I am going to be conducting an experiment of my own using a break out board
I am in a similar boat as you, and I have successfully built my own serial cable using the podbreakout, and have implemented a serial class that supports reading / writing. I can confirm that I have read working, as I have tested it with my RFID reader. I am in the process of writing code that will send a command to the Arduino from the iPhone, and then have the Arduino perform a task based on the command.
Here is a document I put together on iDevice serial com,
https://docs.google.com/document/d/1Yi9_hcw8XSyYNCG2OJT9oHlTG-dC-Dnuc58VIULa81Q/edit?usp=sharing
and the serial class can be seen in the project I am working on.
https://github.com/ipatch/KegCop