Hi All,
I have interfaced my arduino uno serially with zedboard using PMOD Connector JE1( which is Further Routed to UART0).
My Arduino is sending data (in the form of distance) of Ultrasonic and IR distance Sensors. I further want these integer values as an input to kalmanfilter and obstacle detection algorithm implemented on ZYNQ PS .
As an output from recieved buffer of Zynq PS UART, I am getting these values as characters (8bit) but I want these values to be integers (16bit) so that i can use them in my algorithm
My Questions are:
Is communicating data from arduino's UART TX and RX pins to that of UART in ZYNQ PS (Via PMOD Connector) an effective way of communicating the two boards?
IS there any builtin Xilinx library function to convert characters or strings to integers?
Or how would I get these recieved results via UART0 (Which are sent from arduino via Seril.print command) in integers instead of characters?
Here is what I am doing till now on Zynq PS
while(1)
{
twhile (RcvCount < (sizeof(str) - 1)) {
tt/*
tt * Recieve the data on UART0 Zynq PS
tt */
ttRcvCount += XUartPs_Recv(&Uart_Ps,
ttttt &str[RcvCount], 1);
t}
//The Code mentioned below is just to check whether the communication btw arduino and zedboard is working or not. My real objective is to get this recieved data in integers, save them in an array and use them as input in obstacle detection algorithm
RcvCount =0;
twhile (RcvCount < (sizeof(str) - 1)) {
ttt/*
ttt * Transmit the data on UART1 of Zynq PS
ttt */
tttRcvCount += XUartPs_Send(&Uart_Ps1,
tttttt &str[RcvCount], 1);
tt}
tRcvCount=0;
}