Are you the publisher? Claim or contact us about this channel


Embed this content in your HTML

Search

Report adult content:

click to rate:

Account: (login)

More Channels


Channel Catalog


Channel Description:

All Content in element14 Community
    0 0
  • 04/14/15--11:40: What do you prefer?

  • 0 0
  • 03/14/15--18:07: Raspberry Pi or Arduino?
  • What would you rather use for your next project, Raspberry Pi or Arduino? Which should schools be equipped with?


    0 0

    Raspberry Pi 7” Touchscreen Display

    Buy NowBuy NowDisplay Installation Guide

    Install Virtual Keyboard*Other Pi Accessories 

    The 7” Touchscreen Monitor for Raspberry Pi gives users the ability to create all-in-one, integrated projects such as tablets, infotainment systems and embedded projects. The 800 x 480 display connects via an adapter board which handles power and signal conversion. Only two connections to the Pi are required; power from the Pi’s GPIO port and a ribbon cable that connects to the DSI port present on all Raspberry Pi’s.  Touchscreen drivers with support for 10-finger touch and an on-screen keyboard will be integrated into the latest Raspbian OS for full functionality without the need for a physical keyboard or mouse.

    *Note: Your NEW Rasp Pi 7.0 needs you to Add a Virtual Keyboard….

     

     

    Raspberry Pi Sense HAT

    Learn More 

    Technical Specification:

      7” Touchscreen Display

      Screen Dimensions: 194mm x 110mm x 20mm (including standoffs)

      Viewable screen size: 155mm x 86mm

      Screen Resolution 800 x 480 pixels

      10 finger capacitive touch

      Connects to the Raspberry Pi board using a ribbon cable connected to the DSI port

      Adapter board is used to power the display and convert the parallel signals from the display to the serial (DSI) port on the Raspberry Pi

      Will require the latest version of Raspbian OS to operate correctly

     

    Features and Benefits

      Turn your Raspberry Pi into a touch screen tablet, infotainment system, or standalone device.

      Truly Interactive - the latest software drivers will support a virtual ‘on screen’ keyboard, so there is no need to plug in a keyboard and mouse.

      Make your own ‘Internet of Things’ (IoT) devices including a visual display. Simply connect your Raspberry Pi, develop a Python script to interact with the display, and you’re ready to create your own home automation devices with touch screen capability.

      A range of educational software and programs available on the Raspberry Pi will be touch enabled, making learning and programming easier on the Raspberry Pi.

    Kit Contents

      7” Touchscreen Display

      Adapter Board

      DSI Ribbon cable

      4 x stand-offs and screws (used to mount the adapter board and Raspberry Pi board to the back of the display

      4 x jumper wires (used to connect the power from the Adapter Board and the GPIO pins on the Pi so the 2Amp power is shared across both units)

    NOTE: THE RASPBERRY PI AND POWER SUPPLY ARE NOT INCLUDED IN THIS KIT AND ARE SOLD SEPARATELY.

    Compatible With:

    Raspberry Pi 3 Model B

    Raspberry Pi 2 Model B

    Raspberry Pi Model B+

    Raspberry Pi Model A+

    The display will technically work with the Model A and Model B boards (connecting it to the DSI port on the Pi board), however the mounting holes on the back of the display will only line up with the newer board design (A+, B+, Pi 2 and Pi 3).

     

    How to Install the Matchbox-Keyboard for your Pi

    1. Connect a physical keyboard to the Raspberry Pi (or SSH into it if that’s your thing.)

    2. Connect to the internet via WiFi or Ethernet.

    3. Open the terminal.

    4. Type sudo apt-get install matchbox-keyboard

    5. Let the program download & install (takes 30s-1min depending on your connection.)

    6. Exit the terminal & reboot your Pi.

    7. The keyboard can be found by clicking the Menu -> Accessories -> Keyboard.

     

    Operating System Support

    In order to be sure you’re running the latest version of Raspbian, connect your Raspberry Pi to the Internet and then open LX Terminal.  Type ‘sudo apt-get update’ to download the latest version of the OS.  Once that’s complete, type ‘sudo apt-get upgrade’ to apply the download to your Raspberry Pi.  That way you’ll have all of the latest drivers and software needed to support the touch screen display.

    Step 1

    Step 2

    Step 3

    Step 4

    Step 5

    Step 6

    Step 7

    Step 8

    Step 9


    0 0

    More often than not the same chip is available in different packages,

    quite often with different number of pins and the packages with fewer

    pins omit some of the lesser used signals.

     

    Currently, you need to create a different symbol for every package: if

    you have a chip that comes in 5 different packages, with a few pin

    differences, you need a symbol drawn for ABC1234-SOIC, ABC1234-BGA,

    ABC1234-TSOP and so on. It's the same damn chip, just on some packages

    some pins are missing.

     

    I wonder if I'm alone with the wish of having just one symbol, with

    every possible signal drawn. Then, when it gets placed to the schematic

    with a package selected, the not bonded pins grey out and don't allow

    wires to be connected to them?

    --

    Zoltán Kócsi

    Bendor Research Pty. Ltd.

     

     


    0 0

    Simulink_blocksets_banner.jpg

     

    Looking to experiment your control algorithm on an embedded platform ?

     

    6 dsPIC33 are fully supported without restrictions :

    • 33EP256MC506
    • 33FJ32MC204
    • 33FJ128MC802
    • 33EP512MU810
    • 33FJ256MC710 / 33FJ256MC710A
    • 33FJ256GP710 / 33FJ256GP710A

    The blockset can be downloaded here .

    To compile the software generated, the free version XC16 compiler can be downloaded here.

    MPLAB X can be downloaded here.


    0 0

    NEW! Raspberry Pi 3 Model B
    Frequently Asked Questions Comparison Chart Technical Specifications
    Unboxing Video 40 Pin Out

     

    PIK3A Table 01.jpgGaming is the perfect way to help newcomers to the Raspberry Pi to connect it with a recognisable lifestyle technology. It's the perfect stepping stone to bring people eye-to-eye with the Raspberry Pi; if it can play all those awesome, classic arcade games, it can also do so much more!

     

    And that's why gaming is often our go-to project when it's time to show people what the Pi is all about. But this time around, with the Raspberry Pi 3 now in the wild, we wanted to do something a little bit different, too. So here's how to make your own minimalist, contemporary interpretation of the classic coin-op cocktail cabinet that uses an IKEA coffee table and a Raspberry Pi 3.

     

    Meet the PIK3A Gaming Table!

     

    Parts, Bits and Pieces

    So here's the gist of this simple, but super-stylish project.

     

    It's an IKEA Lack coffee table with an LCD monitor cut into the top, arcade controls next to the monitor, and a Raspberry Pi 3 and accessories buried inside the table.

     

    Let's begin with an overview of the parts you'll need:

    • The Cabinet: IKEA Lack coffee table.
    • The Brains: Raspberry Pi
    • The Controls: Arduino LeonardoArduino Leonardo
    • The Joystick: A classic, four-way ball-top joystick.
    • The Buttons: From CPC  - From MCM
    • The Display: An old 17" LCD monitor (4:3 ratio is better given the square shape of the table).
    • The Sound:This pair of USB-powered computer speakers.
    • ThePower: A Raspberry Pi 2.5A USB power supply, and a mains extension.
    • The Stuff: Cables, connectors, screws.

     

    Table Top Gaming

    This isn't really intended as a woodworking project, but we trashed at least one table when prototyping this so maybe we can help you to make only the holes the table needs. So, let's begin with the hacking and sawing, and then we'll look at the innards.

     

    Dismantle Your Monitor

    The old Acer AL1716 monitors we used seem fairly generic, in terms of 17" LCD screens, so hopefully yours will pan out the same. By taking the screen chassis out of the plastic casing (nothing complicated there -- take out the screws and prize the two halves apart) you should be left with the screen inside the shielding housing that's almost exactly the same depth as a LACK coffee table. This means that once you've got the screen, all you need to do is drop it into the hole we're about to cut into the PIK3A table top.

     

    And by removing the bezel around the LCD, the screen will sit flush with the top of the table, and give you that essential minimalist finish.

     

    {gallery:autoplay=false} Removing the LCD from the Monitor Housing

    Remove the stand, and any screws in the back of the monitor's housing.

    01 - 01.jpg

    It's probably all clipped together, so carefully pry the back of the housing away from the silver bezel around the screen.

    01 - 02.jpg

    You don't need to remove any of the shielding inside once the housing is apart. This is better left in place, to protect the back of the LCD. Note that you might need to relocate (and protect/insulate) the small PCB with the monitor's buttons on.

    01 - 03.jpg

    Remove any small screws that fix the bezel to the LCD's shielding.

    01 - 04.jpg

    Leaving you with an LCD panel that'll sit nice and flush to the table top.

    01 - 05.jpg

     

    Screen Mounting

    The first time out we used a Dremel with a router attachment to cut the hole in the table top for the monitor, which actually worked very nicely. However, these ultra-cheap tables really don't warrant that much power tool action, when a Stanley knife does the job just as easily and with a lot less mess. The choice is yours, of course.

     

    Below you can see how we drew around the screen to get the sizing for the hole, and then drilled 13mm holes in each corner to give the cut-out some nice, radius corners.

     

    Clamp a straight edge along the outside of the line you want to cut, and repeatedly run the knife along it. Remember not to cut all the way into the hole on the opposite side from where you started. Chances are the knife will continue and make a mess of the nice radius you put in there. Instead, stop 10cm short and cut again from the other end.

     

    Go around all four sides (it won't take a lot of effort) and prize out the cut-out piece. It won't just come free, as it's glued to the structural filling inside the table, so take care when prizing it up so as not to damage the surface of the table. Run a knife around the honeycomb paper filling, and pull it out. You now have a hole to drop the monitor in.

     

    {gallery:autoplay=false} Mounting the Screen in the Table

    Lay the dismantled monitor on the table and draw around it. I also put the joystick and buttons roughly in place, to help locate the monitor in its ideal position.

    02 - 01.jpg

    Use the drill bit for the corners to mark where to drill. This'll give you nice, rounded corners on the cut out.

    02 - 02.jpg

    Drill the four corner holes for the cut out.

    02 - 03.jpg

    Mask off the area around the hold, to protect the surface of the table when you clamp a straight edge to it.

    02 - 04.jpg

    Clamp a straight edge to the outside of the cut out (so if you slip, the damage will be on the piece you're removing), and make lots of gentler cuts from one hole along the straight edge, stopping short of the second hole. Cut from the second hole, back along the same line to prevent the knife from slipping and damaging the radius of the second hole.

    02 - 05.jpg

    When you've cut right through the table top on all four sides, carefully pry the cut out up. It'll be stuck to the innards of the table, but will come free with a little effort. Save the cut out for later on.

    02 - 06.jpg

    Run a knife around the honeycomb and rip it out.

    02 - 07.jpg

    You've a nice, neat, monitor-shaped hole in the table!

    02 - 08.jpg

    If it's all gone well, take a moment to feel a little smug about yourself.

    02 - 09.jpg

     

     

    Control Mounting

    Flip the table top over and cut a letter box into the back. This gives you access to the inside-back of the table top so you can mount the joystick and buttons. Cut it out the same way as before and remove the honeycomb.

     

    Mark where you want to mount your joystick and buttons -- we went with four buttons, to cover systems like the SNES and PlayStation -- and drill 28mm holes for each one. This is the standard size for arcade buttons, and also gives the joystick plenty of room to move without the hole being visible around the round, flat cover that comes with the joystick.

     

    But we didn't want any fixings visible on the PIK3A table top, which meant we couldn't use the mounting holes in the joystick's plate. Instead, we removed the mounting plate and used the screws that attach it to the body of the joystick (where the microswitches are) to fix the joystick in place. They're a little bit short, but when you countersink the holes in the table top, they'll still reach and grab hold of the thread solidly.

     

    You'll need to remove the mounting plate's screws and the ball top, and then offer the joystick up from underneath the table. It's a little tricky, as the plate will be loose when you're inserting the joystick into the table, but it's not too hard. When it's in place, replace the mounting plate's screws when passing them through the table top, put the round cover over the stick, put the ball top back on, and you've fixed the joystick in place without any visible screws.

     

    The buttons are a simple matter -- drill the 28mm hole, and put the nut on the back of the button! We went with a diamond arrangement for the buttons, plus a start button and coin button on the side of the table top.

     

     

    {gallery:autoplay=false} Mounting the Controls

    I was a bit rougher cutting the access panel in the back, as it's not as visible as the table top. So mark it up, and cut out the minimum that you need (to help maintain the table's already waning stability).

    03 - 01.jpg

    The access panel cut out.

    03 - 02.jpg

    Mark where you want your buttons and joystick (including those on the edge for coin and start), and drill 28mm holes for each one.

    03 - 03.jpg

    Remove the mounting plate from the joystick. These are the mounting holes you'll use to hold the joystick in place.

    03 - 04.jpg

    Use the mounting plate to mark the four holes just around the centre. You'll also need to countersink these holes so the screw heads sit flush.

    03 - 05.jpg

    Remove the ball top from the joystick, hold the mounting plate in place underneath and screw the joystick in place from above.

    03 - 06.jpg

    Put the round cover over the joystick and screw the ball top back in place. And you can now fix all the buttons in place, too.

    03 - 07.jpg

     

     

    Control Interface

    Arcade controls are actually very simple. Even the joysticks are effectively just normally open push buttons (one for each of the four directions). The thing is, computers like the Raspberry Pi don't generally accept such simple buttons as a controller! So we've opted for an Arduino Leonardo as a way to interface the arcade controls with the Raspberry Pi (moreover, the video game emulators the Pi will be running), as it can be set to identify itself to the computer/Raspberry Pi as a standard keyboard.

     

    So each button is connected into one of the Leonardo's inputs, which translates them into keyboard key presses. A ground wire loops around the other side of each microswitch. Because we love the old coin-ops, we set ours up using the standard keyboard controls for MAME. You don't have to do this, but it'll save you a job if you do it this way.

     

    Leonardo Controller Wiring.png

     

    Download and install the Arduino IDE, if you haven't already, and plug in your Leonardo to your computer via a USB cable. Below is the code we hammered together that translates the joystick and buttons into key presses (using the MAME standards, as previously mentioned). But coders we ain't, so if you can improve on this sketch, please post it in the comments.

     

    Before that, here's what to do if you've never played with Arduino before (skip ahead if you know how to upload the sketch to your Leonardo).

      • A "sketch" is a program that your Leonardo will run after it's been uploaded. You can copy and paste the code below into the Arduino IDE window, or download the attached sketch file and open it using the IDE window. It's the same code, but take your pick of how to get onto the Arduino.
      • Take a read through, and you'll see how each input relates to a specific keyboard key press. You can make any desired changes here before uploading to the Leonardo.
      • Click the "Tools" menu and select "Arduino Leonardo" from the "Board" option.
      • Click "Tools" again, and select your Leonardo from the list in the "Ports" option. It's now ready for uploading your sketch.
      • Click the "Upload" button (a circular button with a right-facing arrow in it) to upload the sketch, and the Leonardo is ready to rock.

     

    Sketch Code:

    //element14 PIK3A Gaming Table Controls, using an Arduino Leonardo//
    
    void setup() {
      Keyboard.begin();  //Joystick and buttons pin allocations  pinMode(0, INPUT_PULLUP); //Joystick Up  pinMode(1, INPUT_PULLUP); //Joystick Down  pinMode(2, INPUT_PULLUP); //Joystick Left  pinMode(3, INPUT_PULLUP); //Joystick Right  pinMode(4, INPUT_PULLUP); //Button 1  pinMode(5, INPUT_PULLUP); //Button 2  pinMode(6, INPUT_PULLUP); //Button 3  pinMode(7, INPUT_PULLUP); //Button 4  pinMode(8, INPUT_PULLUP); //Coin  pinMode(9, INPUT_PULLUP); //Start
    }
    
    
    void loop() {
    
    
      // Button labels:  int joystickUp = digitalRead(0);  int joystickDown = digitalRead(1);  int joystickLeft = digitalRead(2);  int joystickRight = digitalRead(3);  int button1 = digitalRead(4);  int button2 = digitalRead(5);  int button3 = digitalRead(6);  int button4 = digitalRead(7);  int coin = digitalRead(8);  int start = digitalRead(9);  // Joystick Up - Arrow Up Key  if (joystickUp == LOW) {    Keyboard.press(218);  }  else {    Keyboard.release(218);  }  // Joystick Down - Arrow Down Key  if (joystickDown == LOW) {    Keyboard.press(217);  }  else {    Keyboard.release(217);  }  // Joystick Left - Arrow Left Key  if (joystickLeft == LOW) {    Keyboard.press(216);  }  else {    Keyboard.release(216);  }  // Joystick Right - Arrow Right Key  if (joystickRight == LOW) {    Keyboard.press(215);  }  else {    Keyboard.release(215);  }  // Button 1 - Left CTRL  if (button1 == LOW) {    Keyboard.press(128);  }  else {    Keyboard.release(128);  }  // Button 2 - Left ALT  if (button2 == LOW) {    Keyboard.press(130);  }  else {    Keyboard.release(130);  }  // Button 3 - Left CTRL  if (button3 == LOW) {    Keyboard.press(32);  }  else {    Keyboard.release(32);  }  // Button 4 - Left CTRL  if (button4 == LOW) {    Keyboard.press(129);  }  else {    Keyboard.release(129);  }  // Coin - 5  if (coin == LOW) {    Keyboard.press(53);  }  else {    Keyboard.release(53);  }  // Start - 1  if (start == LOW) {    Keyboard.press(49); delay(100);  }  else {    Keyboard.release(49);  } 
    }

     

    Audio

    These cube-shaped USB speakers from CPC were perfect for this job. Admittedly, you're about to void the warranty, but they're not expensive

     

    What's great about them is that they're powered externally, so you get better volume, they're small, and the volume control is beautifully low profile; we're going to transplant that onto the edge of the PIK3A's table top next to the start and coin buttons. The speakers themselves are mounted inside the table, pointing downwards (so the grille holes aren't visible from the top).

     

    There's nothing fancy about this task. Dismantle the speakers, desolder and then resolder each cable in turn so you can remove the speaker housings. You'll also need to extend the wires for the right speaker, as they're very short on account of being in the same housing as the volume control board. The 3.5mm jack goes into the Pi's audio output.

     

    Fix the speakers inside the table on either side of the access hole for the joystick and buttons, and drill a 10mm hole in the front edge of the table for the volume control potentiometer. We then used heat glue to keep the volume control board in place.

     

    {gallery:autoplay=false} Dismantling and Installing the Speakers

    Unscrew the front of the speakers and remove the volume control. You'll need to pry the dial off the back and unscrew the nut holding it in place.

    04 - 01.jpg

    Desolder and reattach the various cables (one at a time, ideally) from the volume control board so you can remove the cube-shaped housings. Extend the wires for the right speaker, too.

    04 - 02.jpg

    Drill a mounting hole in the edge of the table to relocate the volume control.

    04 - 03.jpg

    Mark the mounting holes for the speakers on either side of the rear access panel.

    04 - 04.jpg

    Drill a few holes for the sound to get out, and then you can fix the speakers in place and the volume control in place. It's probably easier to do it before the joystick and buttons are in place.

    04 - 05.jpg

     

     

    Power

    There wasn't really much room left to embed a mains extension inside the table. We cut a connector into the bottom, and wired the extension lead into that. This way we can add a longer power cable if required, or even use one for different regions should the PIK3A table find itself going abroad.

     

    We've powered the speakers and Pi separately, just to spread the load out a bit, but to be honest the Pi3 could handle the speakers from its USB ports. The choice is yours, here.

     

    The monitor, Pi3 and speakers are all connected into the mains extension, powering everything up while hiding the connections beneath the table.

    {gallery:autoplay=false} Powering all the Parts

    Mark a square in the back corner underneath the table and cut a hole for the power connector. The mains extension is going to connect to the rear of this IEC connector.

    05 - 01.jpg

    Remove the plug from the back of the mains extensions, feed the cable through the inside of the table and bring it out of the hole for the IEC connector. You can now solder the wires to the reverse of the IEC connector, and fit it in place.

    05 - 02.jpg

    It doesn't hurt to screw the mains extension to the bottom of the table, too. In my experience, they tend to fall off the eyelet holes if there's a light breeze, so this one is screwed in place from inside.

    You can plug the monitor and a couple of USB adapters into this, to power the screen, Raspberry Pi and speakers, while only requiring one power cable.

    05 - 03.jpg

    Finishing Touches

    The monitor is a bit vulnerable here, so we decided to get a piece of 3mm acrylic cut to the same size as the table top (550mm by 550mm). It's just screwed into the table top in each corner, and the screws hidden behind screw caps. It's a cheap way to keep things protected.

     

    I also added a panel mount USB port next to the access panel underneath, just in case I ever need to plug a USB keyboard (or other peripheral -- it could be a joypad if you wanted) into the Pi3.

     

    {gallery:autoplay=false} Finishing Touches

    An external USB port that goes into the Pi. This is a good one, as it also has a dust cap, since this probably isn't going to get a lot of use.

    06 - 01.jpg

    If you decide to put an acrylic or polycarbonate sheet on top to protect the monitor, remember to put it in place before you insert the buttons, as they'll need to pass through the sheet.

    Here we've screwed it in place in each corner, and covered the screw heads with caps.

    06 - 02.jpg

    Remember how you saved the cut out from the monitor hole? Trim it down to make a cover for the access panel on the back, after notching the bottom of the table as an exit for the power cables.

    06 - 03.jpg

    The finished PIK3A table is strong enough to hold Baxter here, but given how much we've hollowed it out, be careful about how much weight you put on it. Definitely don't stand on it to change a light bulb (mind you, I wouldn't trust these enough do that with a new Ikea table).

    06 - 04.jpg

     

    20160226_103336.jpgThen it's just a case of screwing the legs to the table top, and installing RetroPie on the SD card. There's one additional step you might have to perform for the time being, to get RetroPie running in the Raspberry Pi 3. The developers will undoubtedly fix things very soon, but for the moment we had to copy over the "*.elf" files (that'd be start.elf, start_cd.elf, start_db.elf and start_x.elf) from the "Boot" partition of an SD card that had the official, Raspberry Pi NOOBs image.

     

    Not a complex or particularly onerous task, but a necessary one for the time being. This should get RetroPie booted up and running beautifully on your awesome new PIK3A retro gaming table. I'm sure it won't be long at all before this step becomes unnecessary, of course -- likely by the time you've built your cab.

     

    UPDATE: The RetroPie guys have already released an updated image, so you don't have to jump through any hoops to get RetroPie working on your Raspberry Pi 3! Great work, guys!

    http://blog.petrockblock.com/2016/03/02/retropie-3-6-is-released/

     

    As you can see, this is a pretty fascinating interpretation of the classic gaming system, so we'd be particularly interested in seeing how you might do the same, as much as copy our build part for part. Post your own retro gaming projects right here in the Raspberry Pi Projects sections, and casually blow our minds!

     

    If you want to see them in action right away, join us as we head out and about on the Raspberry Pi 3's launch day in Leeds and Chicago!

     

    And if you're looking to delve a little deeper into the Raspberry Pi 3, why not sign up for our RoadTest right now and review the unit for the world to see?


    0 0

    Hi. I'm new to Eagle. I know the very basics of how to use it, but I have some problems adding a part to my board. I wan't to add a PLCC68 socket, which is included in the smd-special library. I just want the empty socked and I can wire up all the connections manually.

     

    However, the socket cannot be found when in schematics mode, where I would normally add it. I can only find it when in board design, and there I'm not allowed to add it. I get the error "Can't backannotate this operation. Please do this in the schematic!", which as I said is not possible because the part does not show up there.

     

    Can I seriously not just add an unnamed socket to my board and have me wire up the connections manually? Do I really have to create a whole new part with every pin predefined? That would be insane, and incredibly frustrating for a newcomer like myself. I could see myself end up using hours figuring that out

     

    The specific part I'm trying to add is PLCC-68 SMTL-TT. It's for a Motorola 68000 on a Neo Geo MV-1C.


    0 0
  • 09/25/16--16:57: Analog Oscilloscope
  • Hello,

    My old analog oscilloscope is making a high frequency noise when I turn it on and its pretty loud. I couldn't find any info about it on google, so does anyone know what it could be?

     

    Model: Hitachi V-1065A


    0 0
  • 09/25/16--17:04: Arduino code problem
  • I have this code to monitor the states of 4 pushbuttons. Each time a button is pushed the text is printed to the serial monitor for that switch. The problem I have is that it keeps printing that until the switch is released. I want to print it only once no matter how long the switch is pressed and held.The switch maybe held down for a sec or an hour, but I want the text printed only once for each time the switch is pressed. Once it is released, then it can be pushed again(or another one pushed) and it only prints one time.

     

    Here is the code bit that needs some fixing:

    #include <SoftwareSerial.h>
    const int buttonPin1 = 8;
    const int buttonPin2 = 9;
    const int buttonPin3 = 10;
    const int buttonPin4 = 11;

    // setup initializes serial and the button pin
    void setup()
    {
      Serial.begin(9600);
      pinMode(buttonPin1, INPUT);
      pinMode(buttonPin2, INPUT);
    pinMode(buttonPin3, INPUT);
      pinMode(buttonPin4, INPUT);

    }

    // loop checks the button pin each time,
    // and will send serial if it is pressed
    void loop()
    {
      if (digitalRead(buttonPin1) == HIGH)
      Serial.print("YES");
      delay(50);

      
      if (digitalRead(buttonPin2) ==HIGH)
      Serial.print("No");
      delay(50);


      if (digitalRead(buttonPin3) == HIGH)
      Serial.print("maybe");
      delay(50);


      if (digitalRead(buttonPin4) ==HIGH)
      Serial.print("never");
      delay(50);
      
    delay(100);
    }

    I tried a bunch of different things to fix it myself, but nothing works. I have a really limited knowledge of arduino anyway.

    It seems after each if test I need something else(no pun intended) I am missing?

    There will only be one button ever pressed at a time. So I need it to keep looking at the switch until it is released.

     

    Thanks in advance!


    0 0

    I'm developing my first 4-layer board in v4.16.  My plan is to prototype it

    with Osh Park before doing a pilot run with the final vendor.  For

    aesthetic reasons (this is for a piece of functional sculpture), I'd like

    the final version to use blind and, possibly, buried vias (so one side of

    the PCB will be "unblemished"), but Osh only supports normal ones that go

    all the way through.  It's not clear to me from the Eagle docs

     

    1.  How to specify which type of via is created when routing on an internal

    layer, or

     

    2.  How to change a normal via to a blind or buried one later. 

     

    Any tips on either or both of these issues appreciated.  I'm wondering how

    big a chore it's going to be to go back and change all the normal vias for

    the production version.

     

    Thanks.

    --

    Web access to CadSoft support forums at www.eaglecentral.ca.  Where the CadSoft EAGLE community meets.