Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Luigi Thirty
Apr 30, 2006

Emergency confection port.

i got really bored and started writing a basic VERB NOUN text adventure parser in python

quote:

E:\Programming\Python\textadventure>python textadventure.py

Test Room
You are on a small grey platform floating in the void. Nothing is above you exce
pt empty blackness. Another platform extends to the east.

You see a Sword, a Lantern and a Butt here.

> take butt
(Converted noun Butt to Actor ID 7)
Taken.
> drop butt
(Converted noun Butt to Actor ID 7)
Dropped.
> look at butt
(Converted noun Butt to Actor ID 7)
A butt.
> take butt
(Converted noun Butt to Actor ID 7)
Taken.
> e

Test Room East
The grey platform ends here. Your entry point lay to the west.

> drop butt
(Converted noun Butt to Actor ID 7)
Dropped.
>

Adbot
ADBOT LOVES YOU

Luigi Thirty
Apr 30, 2006

Emergency confection port.

capcom pinball used surface-mounted everything and someone hacked socketed chips onto where the surface-mounted... something goes. this makes certain chips (like the LM339s that are part of the switch matrix, I think i see an LM part number on one of those) unreliable. capcom didn't have any pinball experience (williams and bally had their own designs forever, data east ripped off williams for their board, sega bought data east pinball and evolved that board set, stern got the corpse of sega pinball and evolved that board set)

so they made really stupid design decisions such as high scores saved onto a surface-mounted zero-power ram chip instead of battery-backed sram, small-gauge wire everywhere, electrolytic caps too big to be mounted vertically, etc.

quote:

The switch matrix board also has another problem, the use of surface mount LM339 chips.

Surface mount chips makes the switch matrix board much smaller and cheaper to manufacturer. But surface mount in pinball is strickly a no-no. The problem is vibration. Eventually the switch matrix LM339 chips start to delaminate from the board, giving reliability problems.

The LM339 chips that are most problematic are the ones towards the edges of the switch matrix board. These are the ones that delaminate first. By "delaminate", I mean the solder cracks that holds the chips to the board (the chips don't actually fall off the board!) This makes the chips intermittent (or at worst, not work at all).

"Regular" pinball circuit boards use double-sided, plated-thru holes. This means the chips actually go through the board, and are soldered on both sides of the board (because capilary action sucks the solder through the circuit board's plated-thru holes). This is a much better design as the chips are held to the board with a better physical connection. Single side boards and surface mount boards don't have the same good physical bond, and will have reliability problems with age.

So what we have here is a switch matrix nightmare. And there is no easy way out of this. Oh and did I mention that the switch board is mounted very low in the head, making switch diagnostics very difficult!

Luigi Thirty fucked around with this message at 05:40 on Mar 2, 2014

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i fed the floridaman twitter account into a markov chain generator

quote:

Florida Man Poses as Santa and Bath Salts

Florida Man Poses as Busty Female Friend, Actually Picks Up Dominos Delivery Man Shoves Drugs Gave Him at IHOP; Demands NSA Phone Taped to Check Status of Chicken Statue Hitched To Be a Warrant, So He Could Steal Nikes, Says Privacy is Not Before Being Invaded Because Mean Neighbors With Pole Made Out at Neighbors Home, Removes Clothes, Starts Shouting 5,6,7,8

Florida Man On 75-Year-Old

(Part 1/3) Florida Man Caught Peeping Into Strangers Home Dressed As He Drives Through Tornado

Florida Man Smuggles 13 Bottles of Setting Himself To Stop

Florida Man Assaults Brother With Florida Man Says Privacy is Not Charge Him Abnormally Strong"

Florida Man Assaults Brother With Bag

Florida Man Arrested For Not Looking Enough Like Britney Spears

Florida Woman Who Wouldnt Bring Him In Crashed by Iron Man, Batman, Jimmy Hart, and Pees

Florida Man Accused Of Throwing Taco Bell Burrito At Son For Florida Man Caught on Kitchen Counter During Hour-Long Crime Spree

Florida Man Rode Stolen Meat Hidden in Front Of Woman Found With Blue Paint and Lobster Poisoned Him

Florida Man Tells Police Wife Has A Place To Steal Condoms And Kill Walmart While High On Deputys Golf Cart Shoots Co-Workers Mouth

Florida Man Squats In Dumpster Before Punching Police After Cops In Air While Babysitting 3-Year-Old

Florida Man Wants to Sell Jesus Christs Toenails on Pants

Luigi Thirty
Apr 30, 2006

Emergency confection port.

if i wanted to buy a AY-3-8910 off the internet, how can i reduce my chances of buying a fake chinese knockoff?

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Sweevo posted:

the chinese knockoffs generally do work. whether they last 20 years of 24/7 use is another thing, but i guess it depends what you want it for. otherwise a lot of the new-old stock chips are real 8910s with the registers at different addresses that were made for OEMs back in the day. if you're modifying/writing your own software then these are perfectly fine.

otherwise the yamaha clones like the YM2149F seem to be easier to find

oh yeah i forgot yamaha made a licensed version. i just want to hook it up to a breadboard and make sweet square wave beeps and boops.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

electronics scares me and i don't want to blow up another arduino

i have a 5V output pin, a 3-terminal normally open microswitch, and an input pin

how do i wire it so i can detect that the switch is closed?

I also have 3 more microswitches and a parallel to serial encoder but i'm not quite there yet

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Werthog 95 posted:

how did u explode an arduino anyway

shorted something in wiring and melted the atmega and a shift register

since then i've been spending a lot of time writing an in-band command set for this lcd shield i have or basically anything not involving wires

Sagebrush posted:

wire the microswitch between ground and the input pin

in your arduino code do this

code:

#define SWITCH whatever

void setup() {
  pinMode(SWITCH, INPUT);
  digitalWrite(SWITCH, HIGH);
}

void loop() {
  if (digitalRead(SWITCH) == LOW) {
    //do a thing cause the switch is closed
  }

}

this sets the pin as an input but also sets the internal pull-up resistor on it so it stays high by default and doesn't float. closing the switch brings it low. this is the proper way of reading switches (at least it's more common than using a pull-down and putting vcc on the switch)

i can program the thing in C just fine, it's electricity that scares me :ohdear:

Luigi Thirty
Apr 30, 2006

Emergency confection port.

okay i did it i'm a genius! what i want to build is a 4x4 input matrix, though currently i only have enough parts to build a 2x2 matrix. or i could figure out how to use the parallel to serial converter i have

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I told you i'm using atmel studio, not arduino ide. i found a C hd44780 library but i couldn't get it to work right so i wrote my own :smug:

i know a lot more about software than hardware

Luigi Thirty
Apr 30, 2006

Emergency confection port.

my goon project is to electrify this wooden baseball pinball game i got for xmas a few years ago, it has 12 holes for switches so that's why i need a 4x4 input matrix

Luigi Thirty
Apr 30, 2006

Emergency confection port.

god drat it i killed another shift register somehow what the gently caress i'm doing it like the diagram says to do



it got too hot to touch and i yanked the cord

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Sagebrush posted:

MR is supposed to be the register clear pin right? are you sure you're connecting it right? on official data sheets that pin will be called SRCLR and if it's your bog standard 74hc595 it's pin 10. do you have the thing plugged into the breadboard in a stupid way? post a photo of the actual physical circuit you have built

i had it wired up wrong cause i'm a moran

did you know that if you hook the ground wire up to QB your chip blows up? you have to hook it up to GND

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I like software you can't blow up software

Luigi Thirty
Apr 30, 2006

Emergency confection port.


aha, see that software controls hardware :smuggo:

Luigi Thirty
Apr 30, 2006

Emergency confection port.

my dilz

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i have a bk precision 1560 60MHz scope i bought at a government auction for 50 dollars it's pretty sweet

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I can never remember scales so I made this on my arduino.



L/R flips through the scales chromatically, up/down for major/minor, select button switches between sharps and flats. Pretty easy to add more scale modes if I want but two is good enough for now.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Sagebrush posted:

i suppose you could always have printed out a piece of paper with the scales on them but that's cool too

probably but that isn't yospos enough and this is more fun

(i may or may not have done that as well)

Luigi Thirty fucked around with this message at 23:54 on Apr 8, 2014

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Deacon of Delicious posted:

unless it is coming out of a tiny thermal printer

tiny thermal print the scales every time you need them

if i had 50 dollars to buy a serial thermal printer or whatever i would totally do this

Luigi Thirty
Apr 30, 2006

Emergency confection port.

continuing on the theme, I learned some more c# by writing a serial monitor thing.



the arduino's running a semi-functional blackjack program. it also understands a few serial commands for debugging. this just does them automatically from a window instead of the terminal in atmel studio.

Luigi Thirty
Apr 30, 2006

Emergency confection port.


yes it looks like a 1990s ham radio program i am bad at the ui

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i've got two TMP35 temperature sensors fresh out of the bag. +5v on the correct pin, gnd on the correct pin. i know this because it's not on fire. readout on Vout - 0.0 volts. both of them do this :wtc:

i stuck an LED in place of the sensor with the same alignment and it lit up so it's not the breadboard. tested the analog input pin, it works. idgi

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Doc Block posted:

The TMP35 outputs the temp in millivolts. Look at the SparkFun page for the TMP36 (beware that the TMP35 has a different temperature range than the TMP36 shown on the page, so the math shown in the comments won't work as-is since the sensor will output a different voltage for the same temp). Direct link to the TMP35/36/37 datasheet. According to the datasheet, the TMP35 outputs 250mV at 25 degrees C, with an output scale of 10mV per degree C. What's the approximate temp where you're working?

Pay attention to the fact that the pinout shown in the datasheet is looking up at the bottom of the device, not looking down at the top. So, with the flat side of the sensor facing you, the left pin is VCC, the middle pin is VOUT, and the rightmost pin is GND. Is that how you have it hooked up? (this is assuming you're using a TMP35 in a TO-92 package)

You'll also need to read all 10 bits from the ADC, no cheating and just grabbing the highest 8.

It's wired correctly (it's not currently on fire). The ambient temperature would be 23-25C. My digital multimeter had a battery leak inside it so all I have is an old Calrad analog multimeter from the 1960s.

I'm getting all 10 bits from the ADC, the range is 0-1023. The sensor is hooked up to analog input 0. The readout from ADC0 is 0. I know the ADC works - the buttons on my LCD board are read through that analog input when I have the LCD board plugged in.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Bloody posted:

you're reading buttons with an adc?

I didn't make the board, it's got five buttons on a resistor ladder

Luigi Thirty
Apr 30, 2006

Emergency confection port.

it has five buttons and each one makes the adc report a different number. whatever the hell that's called dang

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Doc Block posted:

not on fire != wired correctly

for the LM75 it is either wired correctly or the casing is 400 degrees

Luigi Thirty
Apr 30, 2006

Emergency confection port.

echinopsis posted:

you need to tell me why i even want costas array and what i would use it for

It gives you the weekly nfl scores

i think it's my board, ever since i burned out the last shift register nothing's worked right on the board. i'll order a new one.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i bought a breadboard-mountable RCA jack but i haven't gotten around to looking up how to output video and build my own Fairchilde Channel F

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i found my text adventure code again and i'm playing with it again. everything i know about semantics i learned from 10 minutes of gleaning wikipedia

pre:
> put sword in butt
{'preposition': {'word': 'in', 'adjunct_of': 'butt'}, 'verb': {'word': 'put'}, 'direct_object': {'verb': 'put', 'word': 'sword'}, 'indirect_object': {'verb': 'put', 'word': 'butt'}}
put: ['imperative_verb']
sword: ['noun']
in: ['preposition']
butt: ['noun']
(Converted noun Sword to Actor ID 6)
(Converted noun Butt to Actor ID 8)
Okay, the sword is now inside the butt.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i put my 4-digit 7-segment board back together. so now I have a rat's nest of 9 wires going from arduino to breadboard - 2 for vcc/gnd, 3 for the shift register, 4 to enable each character in sequence. what is the better way than "cram them into a spare plastic header and ziptie them together" to organize them

if only there was some IC that could generate voltage pulses every 5ms (i have a 555, a big box of resistors, and a few .1uf capacitors but i haven't figured out how to combine them yet) and then another that increments between one of multiple outputs on each pulse (i don't know what this is called)

Luigi Thirty fucked around with this message at 18:49 on Jul 3, 2014

Luigi Thirty
Apr 30, 2006

Emergency confection port.

no you need a cell phone shield so you can dial up the other Arduino like it's an alarm system from 1977

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Sweevo posted:

decade counter?

that's it now i can use this 555 for something

Luigi Thirty
Apr 30, 2006

Emergency confection port.

okay, ordered decade counter and components to build my own external timer circuit instead of doing it in the arduino. :toot:

too many wires aaaag

https://www.youtube.com/watch?v=0FOw4f1_AeU

i'm cheating and padding the string with 4 spaces :saddowns:

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I like my Arduino because atmel studio is a custom version of visual studio and visual studio is the best IDE ever made

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i have a b&k 60mhz oscilloscope I paid 10 dollars for the college was selling how do I draw a dick on it with my Arduino

Luigi Thirty
Apr 30, 2006

Emergency confection port.

well supposedly we're going to have multimillion bit memory devices by 1989

Luigi Thirty
Apr 30, 2006

Emergency confection port.

there are progmem versions of the C string functions as well which you would need to use if you put them in progmem

Luigi Thirty
Apr 30, 2006

Emergency confection port.

spankmeister posted:

how is sinne wave formed

how microcontroller get pragnet

first you need a bistable multivibrator

Luigi Thirty
Apr 30, 2006

Emergency confection port.

are you sure she wasn't Heisenberg irl

Adbot
ADBOT LOVES YOU

Luigi Thirty
Apr 30, 2006

Emergency confection port.

ah dammit i bought a 16-key keypad but i don't have enough i/o pins on the arduino to run the keypad (8 pins) and 4-character display (7 pins) so i can't build the world's most impractical calculator

i also got a second shift register and display but my breadboard is too small to fit all that :mad:

i went to radio shack to see if they even still had a parts bin and i bought a quad comparator in a yellow blister pack with "tandy corp" on the front

Luigi Thirty fucked around with this message at 22:05 on Jul 4, 2014

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply