• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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 9 Dec 2019, 13:55

    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

    C 1 Reply Last reply 9 Dec 2019, 18:35 Reply Quote 0
    • I
      IanDaemon
      last edited by IanDaemon 12 Sept 2019, 18:14 9 Dec 2019, 14:44

      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
      • C
        cyperghost @Devabhai
        last edited by 9 Dec 2019, 18:35

        @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?

        I 1 Reply Last reply 12 Dec 2019, 13:35 Reply Quote 0
        • I
          IanDaemon @cyperghost
          last edited by IanDaemon 12 Dec 2019, 15:46 12 Dec 2019, 13:35

          @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
          C 1 Reply Last reply 14 Dec 2019, 09:37 Reply Quote 0
          • C
            cyperghost @IanDaemon
            last edited by 14 Dec 2019, 09:37

            @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
            4 out of 5
            • First post
              5/5
              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.

              This community forum collects and processes your personal information.
              consent.not_received