Announcement

Collapse
No announcement yet.

Wheezy Image

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wheezy Image

    Could I please get a link to the latest release of Armadillian based on Wheezy?

  • #2
    Hello,

    I believe its this one, June 2015.
    Assuming you are using the 4.3" Armadillo?

    http://www.4dsystems.com.au/productp...lian_R_1_1.zip

    Is there a problem with the Jessie version?

    Regards
    James

    Comment


    • #3
      Thanks James.

      We have a working prototype on Wheezy and want to use Jessie for the command line networking, but have two major issues.

      1. Our python scripts to talk to the GPIO pins don't work
      2. We boot into a windowless xsession running a midori web interface. About half the time the screen is blank on boot after a successful post. Happens on multiple Armadillos and SD cards.

      Both of the above could probably be solved with some debugging, but they both just work under Wheezy, so for now we'll stick with that.

      Comment


      • #4

        Hi lsparke,

        Good Day.

        For item 1. After you install a fresh image of Armadillian Jessie,

        Update the armadillo
        Install wiringARM which you can download from the attachment
        Unzip the file and go to the folder wiringARM-Rev_1_0
        Follow the instruction in the file INSTALL.
        Reboot the Armadillo
        Than try your code.

        For item 2. Does the midori web interface boot up before the screen goes to blank?Did you disable the blanking or disable the screensaver?

        Regards,

        Ferdinand
        Attached Files

        Comment


        • #5
          Hi Ferdinand, thanks for your reply.

          The wiringARM link isn't working, is there somewhere else I can download it from?

          Comment


          • #6
            Hi lsparke,

            Link works fine for me. Make sure you are signed into the forum, and refresh the page, and then try downloading it again. If that gives you a white screen, press refresh again and it should download. Its your browser caching the page when you are not signed in which normally causes this, as downloads are only possible when you sign in.

            Regards
            James

            Comment


            • #7
              Thanks, the sign-in/refresh thing did the trick.

              Comment


              • #8
                I'm still having issues with python connecting to the serial port. Here's a very simple script that runs no problem on Wheezy:

                Code:
                import serial
                import sys
                
                port = serial.Serial("/dev/ttyAMA0", baudrate=115200, timeout=0.1)
                
                write = sys.argv[1]
                port.write("\x02" + write + "\x03")
                rcv = port.read(100)
                print(rcv)
                However on Jessie I either get no response, junk data or an error 11:

                Code:
                File "Run.py", line 8, in <module>
                    rcv = port.read(100)
                  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 453, in read
                    buf = os.read(self.fd, size-len(read))

                Comment


                • #9

                  Hi Isparke,

                  Good Day.
                  I tried your code and its work fine for me. Please try to re-install pyserial module.

                  Code:
                  pip install pyserial
                  Also try to check if you successfully installed the wiringARM by typing,


                  Code:
                  gpioArm readall
                  It should display the configuration of the pins of the armadillo. If it is successful try this sample.



                  Code:
                  import serial
                  import time
                  
                  port = serial.Serial("/dev/ttyAMA0", 115200, timeout=2)
                  if (port.isOpen() == False):
                      port.open();
                  
                  outStr = ''
                  inStr = ''
                  
                  port.flushInput()
                  port.flushOutput();
                  
                  
                  for i, a in enumerate(range(33, 126)):
                      outStr = chr(a)
                  
                      port.write(outStr)
                      time.sleep(0.05)
                      inStr = port.read(port.inWaiting())
                  
                      print "inStr = " + inStr
                      print "outStr = " + outStr
                  
                      if(inStr == outStr):
                          print "WORKED!”
                      else:
                          print "failed"
                  
                  port.close()
                  BR,

                  Comment


                  • #10
                    Hi Ferdinand,

                    Running pip install pyserial or pip install --upgrade pyserial says it's already the latest.

                    gpioArm readall looks ok:

                    Code:
                    +----------+------+--------+------+-------+
                    
                    | wiringArm | GPIO | Name   | Mode | Value |
                    
                    +----------+------+--------+------+-------+
                    
                    |      0   |  41  | H2-3   | ALT0 | Low   |
                    
                    |      1   |  40  | H2-4   | IN   | High  |
                    
                    |      2   |  34  | H2-5   | IN   | Low   |
                    
                    |      3   |  46  | H2-6   | IN   | High  |
                    
                    |      4   |  33  | H2-7   | ALT3 | High  |
                    
                    |      5   |  32  | H2-8   | ALT3 | High  |
                    
                    |      6   |  37  | H1-1   | ALT0 | Low   |
                    
                    |      7   |  38  | H1-1   | ALT0 | Low   |
                    
                    |      8   |  39  | H1-2   | ALT0 | Low   |
                    
                    |      9   |  35  | H1-3   | ALT0 | High  |
                    
                    |     10   |  36  | H1-4   | IN   | Low   |
                    
                    |     11   |  45  | H1-5   | ALT2 | High  |
                    
                    |     12   |  31  | H1-6   | IN   | Low   |
                    
                    |     13   |  44  | H1-7   | ALT2 | High  |
                    
                    +----------+------+--------+------+-------+
                    However your example script is failing, here's the last few lines:

                    Code:
                    inStr =
                    
                    outStr = t
                    
                    failed
                    
                    inStr =
                    
                    outStr = u
                    
                    failed
                    
                    inStr =
                    
                    outStr = v
                    
                    failed
                    
                    inStr =
                    
                    outStr = w
                    
                    failed
                    
                    inStr =
                    
                    outStr = x
                    
                    failed
                    
                    inStr =
                    
                    outStr = y
                    
                    failed
                    
                    inStr =
                    
                    outStr = z
                    
                    failed
                    
                    inStr =
                    
                    outStr = {
                    
                    failed
                    
                    inStr =
                    
                    outStr = |
                    
                    failed
                    
                    inStr =
                    
                    outStr = }
                    
                    failed

                    Comment


                    • #11

                      Hi Isparke,

                      Good Day.

                      You need to connect a wire from Rx to Tx or short Rx/Tx of the armadillo to be able to work. It is on H2 Pinout pin 7 (RX0) and pin 8 (TX0).

                      BR,

                      Comment


                      • #12
                        Thanks. The test script does work if you short the pins, however the serial connection to my device is still not working.

                        I've been able to identify the problem, the buffer isn't getting flushed.

                        Code:
                         
                         import serial import sys  port = serial.Serial("/dev/ttyAMA0", baudrate=115200, timeout=0.1)  
                         port.flushInput() port.flushOutput()  write = sys.argv[1] port.write("\x02" + write + "\x03") rcv = port.read(100) print(rcv)
                        Even with flush input and output what we're seeing is the first call sends ",U," and we get the correct response ",0,0,0,". The second call then sends through the response with the call, so ",0,0,0,,U,". This is very strange and no matter what I try I can't seem to flush the buffer. These calls are also made individually from the command line "sudo python Test.py", so they're not even in a loop in the same call. The same script runs fine in Wheezy, but for some reason in Jessie the buffer isn't being cleared.

                        Comment


                        • #13
                          Have you disabled the console and default UART TTY that the system creates? Without doing that your serial communications will go astray and strange things will happen. Follow the standard Raspberry Pi instructions for disabling the console etc.

                          Comment


                          • #14
                            this is great

                            Comment

                            Working...
                            X