SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By sk1tt1sh
#181471
Hello,

I'm using the Base Block and Arduino Block with the Intel Edison.

I have uploaded a sketch to the Arduino via ftdi, and ensured that there was serial output with the Arduino serial monitor.

My next step was to connect the base block to the Arduino block and the edison. From there I attempted to use Node.js with "serialport" to read data from the Arduino block. However the data I get back is not what the Arduino is sending.
Example:
<Buffer 84 e9 f3 f4 e1 ee c3 e5 7a 20 72 75 75 0d 0a 8d c5 f3 f3 c1 c7 e5 20 f3 e5 ee f4 7a 60 70 0d 0a c2 c5 e1 ed 40 e2 f2 cf eb e5 ce 7a 60 30 0d 0a>

Is there something I'm missing?

Thanks!
By sk1tt1sh
#181535
Update:

I posted over at Intel for some help as well.
https://communities.intel.com/message/293353

They indicated I should try 134/135 for gpio.

Referring to the pdf (https://cdn.sparkfun.com/datasheets/Dev ... _block.pdf) and the instructions for the block itself: UART 2 is the OTG console (134/135) whereas the block says UART1 to be used. (130/131 on the edison according to the pdf).

Heres a session output for using UART 2 (which is wrong I know) - THE SAME HAPPENS USING UART 1.

root@edison:~# echo -n 134 > /sys/class/gpio/export
sh: write error: Device or resource busy #134 already doing something?
root@edison:~# echo -n 135 > /sys/class/gpio/export
root@edison:~# echo mode1 > /sys/kernel/debug/gpio_debug/gpio134/current_pinmux
root@edison:~# echo in > /sys/class/gpio/gpio134/direction
root@edison:~# echo mode1 > /sys/kernel/debug/gpio_debug/gpio135/current_pinmux
root@edison:~# echo out > /sys/class/gpio/gpio135/direction
root@edison:~# stty -F /dev/ttyMFD1
speed 115200 baud; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-brkint -imaxbel
root@edison:~# cat /dev/ttyMFD1
▒▒▒▒▒▒▒▒z@ruu

▒▒▒▒▒▒▒@▒▒▒▒z@p

▒▒▒▒`▒▒▒▒▒▒z p

▒▒▒▒▒▒▒▒z@ru5

▒▒▒▒▒▒▒@▒▒▒▒z`p
By sk1tt1sh
#181539
115200 is an unusable baud rate.

By setting to 9600 on the arduino and using 9600 on the edison I was able to see the data!

Steps:
Code: Select all
echo -n 130 > /sys/class/gpio/export //may not need, may already be exported
echo -n 131 > /sys/class/gpio/export //may not need, may already be exported
echo mode1 > /sys/kernel/debug/gpio_debug/gpio130/current_pinmux // potentially unneeded as well.
echo mode1 > /sys/kernel/debug/gpio_debug/gpio131/current_pinmux // potentially unneeded as well.
echo in > /sys/class/gpio/gpio130/direction
echo out > /sys/class/gpio/gpio131/direction
..
cat /dev/ttyMFD1
User avatar
By Ross Robotics
#181551
Thanks for posting up the solution. I am sure it will help someone in the future.