I want to upload Arduino sketch via Raspberry pi using windows 10 IOT platform (Visual studio universal application), Has anybody any idea how to do this?
Sketch from cloud > > > > Raspberry pi ------> Arduino
In this diagram sketch download from the cloud and via Rpi upload to Arduino.
The solution is pretty straight forward as the question stated the flow.
Cloud --> RPi --> Arduino.
Step 1
Upload the sketch in the Cloud Instance (ftp or http)
Step 2
In the windows IoT Core, wget the sketch file and Install Arduino IDE
wget http://cloud-server/sketches/program1.ino
sudo apt-get update
sudo apt-get install arduino
Step 3
Reboot the RPi
sudo reboot
Step 4
When the RPi rebooted,
open the Arduino IDE and select the port to upload the sketch
/dev/tty/USB0
If the Step 2 wont go successful then try to install windows gnu tool chain
http://gnutoolchains.com/raspberry/
to compile and install piduino as follows
mkdir hardware/RaspberryPi
cd hardware/RaspberryPi
git clone https://github.com/me-no-dev/RasPiArduino piduino
It could have been use full if you have mentioned the whole problem you have. I will try to answer the best I can:
Solution One:
You can maintain a shared memory for the Raspberry pi and Arduino board. (It can be some external SD card). Get the code from the cloud using Raspberry pi and write this using file streams into the shared memory. Then read this file from the same shared memory using Arduino.
Solution Two:
If you are not worried about the exact file and your only concern in the logic, interface the Arduino to Raspberry pi as a slave device. Use the Arduino I/O ports to read the digital signals or values from raspberry pi which are generated according to the code you got from cloud using windows10 IOT platform.
I hope this could help you to some extent.
Related
I'm trying to get data back from a magstripe reader and an rfid reader that are plugged into the raspberry pi and communicate via serial. I can connect to the readers but when I try to read from them I don't get anything.
Was wondering if the driver even works on the newer iot OS versions.
So I used the code located from this link! in conjunction with the driver install steps from the tutorial Rita shared and I was able to get the Serial Device's, open them and and start reading data.
I'm using IoT-Edge on my Raspberry Pi 3. Since IoT-edge isn't compatible with Windows 10 IoT Core on Raspberry Pi 3, my Raspberry is on Raspbian.
I'm trying to read my UART ports to read XBee sensor data.
My edge's modules are written in C# thus far.
I'm using Raspbian so I can't use the class System.IO.Ports.SerialPort since System.IO.Ports is only compatible on Windows system. Is there another way to read my UART ports inside my module? (I'm ready to write a module in something other than C# if I can deploy it the same way.)
If not, is there at least a way to read/write data from a shared file between containers/raspberry without manually changing docker container file binding mode each time we deploy a module version (since the default binding mode for docker container is read-only, but my Raspberry will have to send data to sensor too)?
You are right about .NET Core not supporting serial on Linux. The latest version of the Python SDK is ready to write Edge modules. We are working on a sample and development guidance on using it, but that's not out yet. Once we have the sample/guidance out (hopefully soon), you should be able to write your module in python and read/write from the serial port. I've confirmed that it works in an Edge container.
You can use .Net Core to read UART ports. .NET Core is a cross-platform, it supports Raspbian,and applications can be written in C#.You can refer to this topic about how to use System.IO.Ports.SerialPort in .Net Core.
I just bought the USB Kinect adapter and realised it just works with USB 3.0. When connecting it to the USB 3.0 port of the PC everything works fine, but when I tried to connect to my Raspberry Pi3 it just won't work. I've already installed all the drivers (Openni,Sensorkinect) but when I execute the "Sample-NiSimpleRead" of OpenNI I get the following message:
One or more of the following nodes could not be enumerated:
Device: PrimeSense/SensorKinect/5.1.2.1: The device is not connected!
Besides, when I try sudo lsusb -v|grep -i nui I get:
iProduct 2 NuiSensor Adaptor
Still, there's no way to make it work. I've seen some projects in Youtube which use Raspberry3 and Kinect, so there should be one way to solve this. Do you have any idea?
Kinect v2 is solely USB3, while RPi is USB2 (as you stated). Maybe you've seen the videos of Kinect v1, which uses USB2?
Kincect V2 needs USB-3, so if you need to plugin into a embedded device then Nvidia Jetson TK1/TX1/TX2 boards are the best bet. Here is a link that shows a demo of Kinect-V2 with Jetson TK1. I have tried the same steps for TX2 and it works fine after the successful installation of "libfreenect2".
Currently I am trying to mount a raspberry pi 3 as my onboard device onto my M100. I am connecting my pi by connecting the UART_CAN2 port to the GND, TXD, and RXD pins of my pi with the provided UART serial cable. I am using the 3.1 branch of the SDK provided by DJI on Github, which is compatible with the M100. When I try to execute djiosdk-linux-sample from my build directory, this comes up:
User Configuration read successfully.
These are your User_Config settings.
Serial port = /dev/ttyS0
Baudrate = 115200
Drone/FC Version: M100
SDK Version: 3.1
App ID: MY_APP_ID_XXXXXXX
App Key: MY_APP_KEY_XXXXXXXXXXXXXXXXXXXXXXX
Does everything look correct? If not, navigate to Linux/UserConfig.txt and make changes.
STATUS init,line 51: Attempting to open device /dev/ttyS0 with baudrate 115200...
STATUS init,line 60: ...Serial started successfully.
Attempting activation..
Automatic activation successful.
Failed to obtain control.
Your RC mode switch is not in mode F. (Is the RC connected and paired?)
This program will exit now.
I am aware that this question has been asked before, but I haven't found any compelling answers. My remote is on mode F, and it is recognized as so on the Assistant application. However, I know that is not the problem. I have heard from other people online (https://github.com/dji-sdk/Onboard-SDK/issues/77), that the remote controller and its mode is not the core of the problem. Does anyone know how to resolve this? Any help would be great.
Thanks,
AWATHIEU
Background info
WinAVR:
I installed WinAVR, and use avrdude.exe comes with WinAVR to download program into our board.
Adapter card:
We have an adapter card with FTDI4232 and AVR m328p on it. PC connects to FTDI4232 with a micro USB cable.
Schematic:
Sorry, I cannot post pics. So just describe the major part of schematic here. Two wires from(DATA_P & DATA_N pins) out from macro USB connector to DP[pin8] and DM[pin7] on 4232. And four wires(SCK, MOSI, MISO, SS_N) out from 4232 to m328p.
How to download program into the card before: Via pocket programmer. But we cannot give one pocket programmer to every engineer, so try to find out a way to download the program into m328p. Coz we have already had FTDI4232 on board, so this seems to be the best choice.
Can I download program via FTDI4232 on adapter card?
I know there is dedicated programmer based on 4232 chip, but this is our own design, I am not sure we can do it or not according to the above schematic.
what I did
Run this command:
C:\WinAVR-20100110\bin\avrdude.exe -c 4232h -p m328p -U flash:w:\Desktop\work\a_card\WinAVR\blink\blink.hex:i
But got the following error:
avrdude.exe: Error: no libftdi or libusb support. Install libftdi1/libusb-1.0 or libftdi/libusb and run configure/make again.
Then, download the compiled libftdi package from this link:
https://code.google.com/p/picusb/downloads/detail?name=libftdi1-1.0_devkit_mingw32_17Feb2013.zip
, and extract it as “compiled_libftdi”.
There is not too much info about how to use this compiled package, so I just found info online.
(1) I installed WinUSB driver for the first two ports of 4232 by Zadig. I can choose one port in the drop down menu, then choose “WinUSB(v6.1,7600…)”, “Install WCID Driver”.
(2) Then, enter into the “compiled_libftdi” folder, run “find_all”, I saw:
Number of FTDI devices found:1
Checking device: 0
Manufactureer: FTDI, Description: USB <-> Serial Converter
I think it means the USB driver for libftdi package installed successfully.
Run the above download command again, still failed.
I thought maybe because the avrdude.exe is out of date. So download a .exe from here:
http://download.savannah.gnu.org/releases/avrdude/avrdude-6.0.1-mingw32.zip
And replace the old one in the WinAVR folder.
Still got the error, but got one extra line info:
avrdude.exe: programmer operation not supported