Jump to content

Search the Community

Showing results for tags 'ping'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Atari Systems
    • Atari General
    • Atari 2600
    • Atari 5200
    • Atari 7800
    • Atari Lynx
    • Atari Jaguar
    • Atari VCS
    • Dedicated Systems
    • Atari 8-Bit Computers
    • Atari ST/TT/Falcon Computers
  • Classic Consoles
  • Classic Computing
  • Modern Consoles
  • Gaming General
  • Marketplace
  • Community
  • Community
  • Game Programming
  • Site
  • PC Gaming
  • The Club of Clubs's Discussion
  • I Hate Sauron's Topics
  • 1088 XEL/XLD Owners and Builders's Topics
  • Atari BBS Gurus's Community Chat
  • Atari BBS Gurus's BBS Callers
  • Atari BBS Gurus's BBS SysOps
  • Atari BBS Gurus's Resources
  • Atari Lynx Programmer Club's CC65
  • Atari Lynx Programmer Club's ASM
  • Atari Lynx Programmer Club's Lynx Programming
  • Atari Lynx Programmer Club's Music/Sound
  • Atari Lynx Programmer Club's Graphics
  • The Official AtariAge Shitpost Club's Shitty meme repository
  • The Official AtariAge Shitpost Club's Read this before you enter too deep
  • Arcade Gaming's Discussion
  • Tesla's Vehicles
  • Tesla's Solar
  • Tesla's PowerWall
  • Tesla's General
  • Harmony/Melody's CDFJ
  • Harmony/Melody's DPC+
  • Harmony/Melody's BUS
  • Harmony/Melody's General
  • ZeroPage Homebrew's Discussion
  • Furry Club's Chat/RP
  • PSPMinis.com's General PSP Minis Discussion and Questions
  • PSPMinis.com's Reviews
  • Atari Lynx 30th Birthday's 30th Birthday Programming Competition Games
  • 3D Printing Club's Chat
  • Drivers' Club's Members' Vehicles
  • Drivers' Club's Drives & Events
  • Drivers' Club's Wrenching
  • Drivers' Club's Found in the Wild
  • Drivers' Club's General Discussion
  • Dirtarians's General Discussion
  • Dirtarians's Members' Rigs
  • Dirtarians's Trail Runs & Reports
  • Dirtarians's Wrenching
  • The Green Herb's Discussions
  • Robin Gravel's new blog's My blog
  • Robin Gravel's new blog's Games released
  • Atari Video Club's Harmony Games
  • Atari Video Club's The Atari Gamer
  • Atari Video Club's Video Game Summit
  • Atari Video Club's Discsuuions
  • Star Wars - The Original Trilogy's Star Wars Talk
  • PlusCart User's Bug reports
  • PlusCart User's Discussion
  • DMGD Club's Incoming!
  • DASM's General
  • AtariVox's Topics
  • Gran Turismo's Gran Turismo
  • Gran Turismo's Misc.
  • Gran Turismo's Announcements
  • The Food Club's Food
  • The Food Club's Drinks
  • The Food Club's Read me first!
  • The (Not So) Official Arcade Archives Club's Rules (READ FIRST)
  • The (Not So) Official Arcade Archives Club's Feedback
  • The (Not So) Official Arcade Archives Club's Rumor Mill
  • The (Not So) Official Arcade Archives Club's Coming Soon
  • The (Not So) Official Arcade Archives Club's General Talk
  • The (Not So) Official Arcade Archives Club's High Score Arena
  • Adelaide South Australia Atari Chat's General Chat & Welcome
  • Adelaide South Australia Atari Chat's Meets
  • Adelaide South Australia Atari Chat's Trades & Swaps
  • KC-ACE Reboot's KC-ACE Reboot Forum
  • The Official Lost Gaming Club's Lost Gaming
  • The Official Lost Gaming Club's Undumped Games
  • The Official Lost Gaming Club's Tip Of My Tounge
  • The Official Lost Gaming Club's Lost Gaming Vault
  • The Official Lost Gaming Club's Club Info
  • GIMP Users's Discussion
  • The Homebrew Discussion's Topics

Blogs

There are no results to display.

There are no results to display.

Calendars

  • AtariAge Calendar
  • The Club of Clubs's Events
  • Atari BBS Gurus's Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website


Facebook


Twitter


Instagram


YouTube


eBay


GitHub


Custom Status


Location


Interests


Currently Playing


Playing Next

Found 2 results

  1. If capturing text from your Arduino to a terminal buffer is all you want to do, you are lucky. You may want to collect data and use it in your own programs. Unfortunately there are not a lot of example programs to learn from and the 850 interface manual can be cryptic for us mortals. Persistence does pay off. Usually the “let’s try this” style of debugging will eventually get you to the proper combination of port settings and program logic. I wanted to hook up a sensor to the Arduino and then read the output through the RS232 port using Atari BASIC. I choose the ultrasound sensor. It will measure the time it takes a sound wave to travel from the sender to an object and back. If you know the speed of sound you can calculate the distance. Now you can imagine that by moving your hand in front of the sensor you can program the SOUND command to change pitch. You can imagine it but doing it may not be so practical. The Arduino Side There are several manufactures of ultrasound sensors. Some will have 3 pins, some will have 4. Both have a +5 volt and GrouND pins. If the sensor has 4 pins, one will trigger the sound pulse and the other change logic states when it senses the sound. I am using the Parallax Ping))) sensor. One data pin is used as output to trigger the pulse. Before the pulse can travel back from an object the pin is set as input. The Ping))) sensor was previously wired and running using an example program in “Arduino: A Quick-Start Guide”. Remember, the Arduino has to be programmed prior to installing the RS232 shield. The following program was uploaded, the RS232 shield installed and the Sensor was wired to pin 7, +5 volt and ground. // Modified Program to read Parallax PING))) sensor// Send time ultrasound travels to objectconst unsigned int pingPin = 7;const unsigned int baudRate = 9600;void setup(){ Serial.begin(baudRate);}void loop(){ pinMode(pingPin, OUTPUT); digitalWrite(pingPin, LOW); delayMicroseconds(2); digitalWrite(pingPin, HIGH); delayMicroseconds(5); digitalWrite(pingPin,LOW); pinMode(pingPin, INPUT); const unsigned long duration = pulseIn(pingPin, HIGH); if (duration == 0) { Serial.println(0); }else { Serial.println(duration); } delay(25);} The program can be tested by reading the input with a terminal program or the Arduino IDE through an RS232 port. Or, remove the shield and wire up the sensor, then read the data through the USB port. The ATARI side The first thing you may want to do is connect the Arduino to the 850 and read the data stream using a terminal program on your 8 bit. Be sure to set the baud rate at 9600. The BASIC program was derived from an example in the 850 manual. Appendix 9 – User Programs, 5. Reading a Digitizer: More Input Than BASIC Can Handle (Page 77-78). The Arduino is programmed to continuously send data to a buffer. The Atari asks for input slower then it is being placed in the buffer. When the buffer is full the Arduino overwrites the data. To keep the buffer in sync with the Atari, a double input method is used in line 100. Read the buffer the first time to empty it and then the second time retrieves the latest reading. (I recommend finding a copy of the manual to read.) The first test program reads the data from the Arduino and prints out the text input and the value. Getting the SS$ into a floating point variable was a little more involved then INSS = VAL(SS$). The first problem was that a graphic character (CHR$(10)?) was placed at the beginning of the data. Not sure where it came from but it needed to be ignored. The second was knowing where the string ended. Line 105 and 110 were used to take care of this problem (most of the time). 10 DIM SS$(10):REM holds input from sound sensor20 XIO 36,#1,15,0,"R1:":REM set baud30 OPEN #1,5,0,"R1:":REM open port40 XIO 40,#1,0,0,"R1:":REM start I/O100 INPUT #1,SS$:INPUT #1,SS$:REM clear buffer,get reading105 X=LEN(SS$):REM Length of text string110 INSS=VAL(SS$(2,X)):REM convert text to floating point120 ? SS$,INSS:REM print data to screen130 GOTO 100:REM do it again Now it was a matter of scaling the INSS variable for the SOUND command. That was easy but…….. it was not expected that the SOUND would turn off when the INPUT command was executed . I tried a few things to see if it would stay on but to no avail. This listing is just the last iteration that was tried. 10 DIM SS$(10)20 XIO 36,#6,15,0,"R1:"30 OPEN #6,5,0,"R1:"40 XIO 40,#6,0,0,"R1:"100 INPUT #6,SS$:INPUT #6,SS$102 CLOSE #6105 X=LEN(SS$)110 INSS=VAL(SS$(2,X))120 ? SS$,INSS125 SOUND 3,INSS/31,10,10126 FOR Y=1 TO 100:NEXT Y130 GOTO 30 This last program simply uses a simple calculation to estimate the distance from the sensor to the object. It might come in handy for a security system or if you’re building a robot with an Atari brain. It was noted that every so often a string length error would occur. I would bet that when this happened the string variable SS$ was empty causing a length error when trying to read SS$(2,0). This was solved with the TRAP 100 command. Anytime an error occurred it would try again. 10 DIM SS$(10)20 XIO 36,#6,15,0,"R1:"30 OPEN #6,5,0,"R1:"40 XIO 40,#6,0,0,"R1:"100 INPUT #6,SS$:INPUT #6,SS$102 TRAP 100105 X=LEN(SS$)110 INSS=VAL(SS$(2,X))120 ? INSS/29/2;" CM"126 FOR Y=1 TO 100:NEXT Y130 GOTO 100 In hindsight I might have started with a lower baud rate and picked another sensor. Optimization of hardware and software will have to wait for another day and another project. Reference: Analog Computing Pocket Reference Card, The, Analog Computing Magazine, 1985 Atari DOS 2.5: 1050 Disk Drive Owner’s manual, Atari Corp. 1985, CO72033-001 Rev. A. Atari 850 Interface Module Operator’s Manual, Atari, Inc. 1980, CO15953 Rev. 1 Poole, Ion, Your Atari Computer, OSBORNE/McGraw-Hill 1982 Schmidt, Maik, Arduino: A Quick-Start Guide, Pragmatic Programmers, LLC. 2011. (Page 87-93)
  2. Ping Made in 48 hours for the April Ludum Dare. http://youtu.be/4o2WSCxtwIk Play NTSC version 1: ping.bin - version 2: ping_2.bin PAL60 version 1: ping_PAL60.bin - version 2: ping_2_PAL60.bin Source (NTSC) - version 1: pingsource.zip - version 2: pingsource2.zip About For a small bat like Ping, the world is a big, dangerous place. Will little Ping make it in her new home? Instructions Move using joystick, ping using echolocation with joystick fire. Version 1 Pinging costs 25 points. You gain points by making progress to the right and by eating bugs. Try to ping as few times as possible to maximize your score. Version 2 Remaining pings are displayed on the right side of the score. You get 4 free pings per room. Any pings over those four will cost 25 points each. Any points you have left over after completing a room will award you a bonus 25 points in addition to 50 points for completing the room. Try to ping as few times as possible to maximize your score. Avoid owls and walls, eat bugs, and get as far as you can! Special Supports AtariVox high score saving. Requires an AtariVox/SaveKey module to be plugged in to controller port 2 (or emulated in Stella). Clear your AtariVox high score for Ping with select + joystick fire while in game. Mute the pinging sound by setting Color/BW to BW. Have fun!
×
×
  • Create New...