Shop OBEX P1 Docs P2 Docs Learn Events
Chapter 5 Exercise #3 — Parallax Forums

Chapter 5 Exercise #3

Set aside 40 longs named swStack for prototyping the SquareWave method in a separate cog

Comments

  • Declare a variable named swCog for storing the cog ID of the cog the SquareWave method gets launched into.
  • Modify the swCog variable declaration for storing three different cog IDs.
  • Why are you posting something that comes from a known source? I think it's been explained that this is not the place to get others to do your home work.
  • JDJD Posts: 570
    edited 2018-02-12 21:14
    It almost looks like an answer to a question. Wonder if someone is pulling a prank on a studen that wasn't paying attention in class.

    Student 1: "Hey, where do we turn in the homework"
    Student 2: "You have to post it in the forums, but sure to include the chapter and exercise"
  • To me it looks more like a challenge question, and that the answer is to be expressed in code.
  • Moderator Notice


    Hello @e687b491

    Please refrain from posting non-questions, statements or running commentary- especially across multiple new topics like you have.

    Thread topics should follow the guidelines set in the forum rules, and beyond that, common sense is best applied in both the questioning and the pursuit (learning) of answers.


    On this occasion, I've merged your threads together for you into this thread.

    You might continue your discovery in this thread if you have questions to ask or achievements to share.

  • JDJD Posts: 570
    JonnyMac wrote: »
    To me it looks more like a challenge question, and that the answer is to be expressed in code.

    Now that all of them are together I see it. lol
  • Good for you guys!! All i was looking for is someone to explain what it wanted me to do. Give me pointers because I don't even know what these questions are asking. I hope you guys feel real big right now. I thought this board was to help people not make them feel like a--hole. But thank you really!
  • e687b491 wrote: »
    Good for you guys!! All i was looking for is someone to explain what it wanted me to do. Give me pointers because I don't even know what these questions are asking. I hope you guys feel real big right now. I thought this board was to help people not make them feel like a--hole. But thank you really!

    They were questions? Really?
    As for the forum being very helpful, it is as very very many have found, but you have to be able to frame and politely ask a question first or is that too hard to do?
    Hint - give us some background or context when asking a question. For instance, say what you are attempting or have attempted etc. This gives us a bit more information in addition to the actual question so that we can frame an answer that is perhaps more specific to where you are at.
  • JonnyMacJonnyMac Posts: 8,924
    edited 2018-02-14 18:14
    They were questions? Really?
    They're questions taken from Andy Lindsay's PE Kit text, probably as a school assignment.

    Remember the good old days when we were kids and we could pop on to the Internet to get answers to our homework assignments? Oh, that's right, there was no Internet when we were kids!
  • VonSzarvasVonSzarvas Posts: 3,278
    edited 2018-02-14 10:19
    e687b491 wrote: »
    All i was looking for is someone to explain what it wanted me to do. Give me pointers because I don't even know what these questions are asking.

    Then you should have written this in your post.

    Everyone here tries to be very helpful. But we are not mind-readers.

    If you copy-paste single line quotes across multiple threads, then how are we to know what you want to achieve? What questions you have or help you seek?

    Respectfully, that sort of posting activity is what spammers do, and our systems are designed to protect the community against that sort of behaviour. Otherwise this place would be a stinking cesspit of worthless information :) We need to have some basic rules, and they are not meant to offend!

    So please don't feel negative about your experience. Just understand that to get help, you need to post questions that explain what help you seek. Think about where you are stuck, and try to express your problem clearly.

    If you consider asking a school professor for help, you probably wouldn't get far just emailing him a text snippet from an exercise book? Surely you'd need to ask a question?

    And as always- the more information you include the better. Text, code, photos, images, etc... Always consider, that what seems obvious in your mind, is not guaranteed to be obvious in the mind of another forum member reading your posts; they can only work with what you write, not what you are thinking.

    Best of luck with your project- don't take offense too easily, and never give up.

    There will always be people here who will try to help you if you ask.


  • e687b491 wrote: »

    1. Set aside 40 longs named swStack for prototyping the SquareWave method in a separate cog

    2. Declare a variable named swCog for storing the cog ID of the cog the SquareWave method gets launched into.

    3. Modify the swCog variable declaration for storing three different cog IDs.

    1. The exercise wants you to declare a variable called swStack that can hold 40 values (longs) which will be used as the stack. See figure 5-4 and related text for explanation and examples.

    2. & 3. See the section Cog ID Indexing. Question 2 wants you to get the cog id for one cognew. Question 3. wants you to use a variable array to get the cog for 3 cognews. The method for that (except for 5 cogs) is shown in the example of that section.

    It's a good idea to re-read the chapter after you read the exercise & project questions. The idea is to use the information in the chapter to come up with similar, but different examples based on the questions.

    Hope this helps
    Tom

  • e687b491 wrote: »
    Good for you guys!! All i was looking for is someone to explain what it wanted me to do. Give me pointers because I don't even know what these questions are asking. I hope you guys feel real big right now. I thought this board was to help people not make them feel like a--hole. But thank you really!
    e687b491 wrote: »
    Yes this is homework, but in the professional world you get help from people who are better at it so you can learn and grow.

    So ... more homework. Are you also taking a course on defensive posturing? Passive aggressive sarcasm?

    Any question which I have asked here with sincere curiosity has been met with an amazingly undeserved amount of respect and courtesy. If you are finding differently, then look not at the forum but at yourself. While not perfect, this group is quite good.

    JonnyMac wrote: »
    Remember the good old days when we were kids and we could pop on to the Internet to get answers to our homework assignments? Oh, that's right, there was no Internet when we were kids!

    In fairness, the rudimentary makings of what we now call the internet were forming when I was in school ... OK, college. Going on the newsgroups with a poorly formed question would still get you flamed 25 years ago. RTFM was a fairly common response.

    [member #1010011010 of the Denizens of Doom - rec.motorcycles ... Flame to Live; Live to Flame]
  • JonnyMacJonnyMac Posts: 8,924
    edited 2018-02-16 06:08
    In fairness, the rudimentary makings of what we now call the internet were forming when I was in school ... OK, college. Going on the newsgroups with a poorly formed question would still get you flamed 25 years ago. RTFM was a fairly common response.
    When I was in high school -- nearly 40 years ago -- we had the library.
  • When I was in high school -- nearly 40 years ago -- we had the library.

    And of course the library was a much better learning center than high school, because you could actually study what you really wanted to learn :)
Sign In or Register to comment.