0

I'll preface this buy saying I am very new to working with Arduino boards or hardware in general. I am attempting to follow a tutorial on instructables

http://www.instructables.com/id/PCBot/step4/Printer-test/

I have my board and printer wired up properly and I have git cloned the python thermal printer. My issue begins at this paragraph:

Open the UART0 serial port by default the GPIO's of the edison are disables.

You can enable them by programming the edison via the Arduino IDE or by using the MRAA library available for several programming languages.

To open enable the UART0 port, TX RX on the edison breakout board, open a Python shell in the thermal and write:

import mraa

x=mraa.Uart(0)

I opened a python shell and entered the import mraa lines and tried to run the printertest.py

I receive an error that says no module named serial. I am not sure where the issue is. I thought the Edison already had python serial installed. I did try to install it with opkg install python-serial but it didn't work. If my issue is with enabling the Uart0 port I am not sure how to go about doing it. I have the Arduino IDE installed but I have no idea how to go about enabling it via the Arduino IDE. The instructions are a bit vague in that paragraph.

*Update I have successfully installed pip and got pyserial installed. Now when I try to run the printertest.py I get an error OSError: [Errno 2] No such file or directory: '/dev/ttyAMA0' which I think is potentially caused by me not succesfully opening Uart0 port but I am not sure how to. I tried adding the import in a shell as well as adding it directly to the code via nano

  • did you try with pip? – Igor Stoppa Oct 25 '15 at 20:53
  • I tried to install pip but I got an error. – Jeff S Oct 25 '15 at 20:56
  • I suggest you paste the opkg error. Just as you describe the problem right now, it's hard to say much, without logs. Same as with pip: show how it fails. – Igor Stoppa Oct 25 '15 at 20:57
  • I just found out I need unofficial repos to install pip so i'll try that next – Jeff S Oct 25 '15 at 21:03
  • I followed this blog to install pip on the edison blog.salvius.org/2015/05/installing-pip-on-intel-edison.html ; however, when I try to install pyserial with pip it says -sh: pip: command not found – Jeff S Oct 25 '15 at 21:21
0

I have solved the issues and successfully connected this printer with the Compute Module. I solved the issue by changing the target of /dev/ttyAMA0 to /dev/ttyMFD1 as shown by http://iotdk.intel.com/docs/master/mraa/edison.html . This was the final step after I had installed pyserial.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.