RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Found this LED Blink code from Robert Plantz, but I'm stuck

    Scheduled Pinned Locked Moved General Discussion and Gaming
    pi3
    5 Posts 3 Posters 318 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Devabhai
      last edited by

      So this link here goes to Robert Plantz's book to a programming exercise where he makes an LED blink 5 times. But the problem I'm having with it is that he is using a Rasp. Pi 3 and I have a zero. I just got into pi's recently and am currently trying to get my son into it with me. If anyone knows what would need to be changed in order for this to work on my pi zero, that would be greatly appreciated.

      https://bob.cs.sonoma.edu/IntroCompOrg-RPi/exercises-34.html

      cyperghostC 1 Reply Last reply Reply Quote 0
      • IanDaemonI
        IanDaemon
        last edited by IanDaemon

        Does your Raspberry Pi Zero have GPIO pins? You linked instructions for a Raspberry Pi 3 that has pins.

        RPi Zero with pins: 4e4e0766-7de0-43fe-afd7-6e0b0f050139-image.png

        RPi Zero without pins: 149f30b8-8cda-4ead-b3f9-a9aea3ffe551-image.png

        2x20-pin Strip Dual Male Header: pins-male.png

        • 5 Favorite Arcade Games in MAME
        • Cocktail Cabinet Games
        • Check out the MAME RoW
        1 Reply Last reply Reply Quote 1
        • cyperghostC
          cyperghost @Devabhai
          last edited by

          @Devabhai I would suggest to go back to chapter 2 and use C and wiringPi-libary or is there any reason why you want to use assembler?

          IanDaemonI 1 Reply Last reply Reply Quote 0
          • IanDaemonI
            IanDaemon @cyperghost
            last edited by IanDaemon

            @cyperghost @Devabhai Wouldn't "C" be easier to learn anyway? This is a teaching scenario right?

            • 5 Favorite Arcade Games in MAME
            • Cocktail Cabinet Games
            • Check out the MAME RoW
            cyperghostC 1 Reply Last reply Reply Quote 0
            • cyperghostC
              cyperghost @IanDaemon
              last edited by

              @IanDaemon I think this isn't the answer here. Easier means for the right purpose. So to let a LED blink the approach is much easier to achive with bash or python. For a learning experiment C is also a good choice. But the whole scenario... A Raspberry Pie to let a LED blink is wrong. A microcontroller (of any kind) would be the correct way ... maybe in a C-style language, maybe by direct adressing. But this is only my opinion.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

              Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.