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
unpacked robinhood
Feb 18, 2013

by Fluffdaddy

babyeatingpsychopath posted:

That just means it's not the for loop initializing that's causing your bit problems. Your program is just not sending one or two bits to begin with. Starting upshifted 17 just means you don't send the bits you're missing, so you always start correctly. Look elsewhere for this problem.

Still don't know what's going on but I've narrowed down the issue a bit.
I've added some padding instructions before the actual loop, which brings back the 2 missing bits.

Here's the current function:

code:
void preamble(){
	PORTB |=_BV(PB1);
	_delay_us(8600);
	PORTB &=~_BV(PB1);
	_delay_us(3100);
}

void sendCode (uint16_t code) {
	TCNT0=0;

	//busywork 1
	OCR0A=0;
	OCR0B=0;
	do ; while ((TIFR & 1<<OCF0B) == 0);
	TIFR = 1<<OCF0B;
	//busywork 2
	OCR0A=0;
	OCR0B=0;
	do ; while ((TIFR & 1<<OCF0B) == 0);
	TIFR = 1<<OCF0B;

		for (uint16_t Bit=0x8000;Bit;Bit=Bit>>1){
			if (code & Bit) {
			OCR0A=255;
			OCR0B=80;
		}
		else {
			OCR0A=130;
			OCR0B=80;
		};
		//wait for TIFR:OCF0B==1
		//The OCF0B bit is set when a Compare Match occurs between the Timer/Counter
		//and the data in OCR0B
		do ; while ((TIFR & 1<<OCF0B) == 0);
		//clear OCF0B by writing a 1
		TIFR = 1<<OCF0B;
	}
	//stop bit (short pulse)
	OCR0A=130;
	OCR0B=80;
	do ; while ((TIFR & 1<<OCF0B) == 0);
	TIFR = 1<<OCF0B;
}

}
My previous post was wrong though: the preamble() function sometimes introduces glitches near the end of the transmission.

So I still need a clean way to generate that opening pulse.
I've tried using a different prescaler setting to avoid calls to _delay_us(..) but it didn't do the trick.

unpacked robinhood fucked around with this message at 19:21 on Oct 5, 2017

Adbot
ADBOT LOVES YOU

Zarikov
Jun 20, 2004

Metal Gear? Metal Gear? Metal Gear!
Dinosaur Gum

Sagebrush posted:

Any Arduino-compatible board with an ATMega32U4 will be able to do keyboard emulation with the native library. The Leonardo is the official Arduino board that can do it, while the Sparkfun Pro Micro is the same thing in a board the size of a stick of gum. You can get knockoff versions of both from eBay, Amazon, AliExpress, etc for cheap. Knockoff Pro Micros are like 4 dollars with free shipping if you're okay with it taking the slow boat.

Well gently caress it let's see what happens. Going to order this feller then: https://www.aliexpress.com/item/Pro-Micro-ATmega32U4-5V-16MHz-Replace-ATmega328-For-Arduino-Pro-Mini-With-2-Row-Pin-Header/32808519179.html

Guess I'll return to this project in, oh, a month or so. Thanks!

xilni
Feb 26, 2014




Zarikov posted:

Well gently caress it let's see what happens. Going to order this feller then: https://www.aliexpress.com/item/Pro-Micro-ATmega32U4-5V-16MHz-Replace-ATmega328-For-Arduino-Pro-Mini-With-2-Row-Pin-Header/32808519179.html

Guess I'll return to this project in, oh, a month or so. Thanks!

Ya I worried the first time I ordered an off brand Arduino clone but I've now come to the conclusion that it's perfectly fine to order near all my prototyping parts from AliExpress.

Just search for whatever you want and sort by Orders and you'll nearly always find a vendor with a good reputation for working products and in the very rare event something doesn't work, they'll almost always offer you a refund for the broken park and/or ship you a new one.

rawrr
Jul 28, 2007
Yeah Aliexpress is actually better for Chinese parts because you can see orders and reviews for that specific product (and sort search results by rating/order).

Protip is to find sellers that offer epacket, which is usually a couple bucks more but means you'll get your stuff usually within a week.

xilni
Feb 26, 2014




rawrr posted:

Yeah Aliexpress is actually better for Chinese parts because you can see orders and reviews for that specific product (and sort search results by rating/order).

Protip is to find sellers that offer epacket, which is usually a couple bucks more but means you'll get your stuff usually within a week.

Praise be the government subsidized shipping that arrives reasonably quickly.

LochNessMonster
Feb 3, 2005

I need about three fitty


I just started working on an 8 year old Seeeduino I once bought, but never found the time/purpose for to work with. Now I do and want to see if it (still) works and I'm having trouble putting example code on it.

It's and old Seeeduino Mega 1.1 (date on the board says 06/24/2009) with the ATMega 1280 chipset on it. I've installed the latest version of the Arduino Sketch software, selected the right board/processor, opened an example (blink) tutorial and tried to upload it to the board. The following error messages pop up in console.

code:
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega1280"

Sketch uses 1470 bytes (1%) of program storage space. Maximum is 126976 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xe6
avrdude: stk500_recv(): programmer is not responding

<repeats for step 2 till 9> 

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe6
Problem uploading to board.  See [url]http://www.arduino.cc/en/Guide/Troubleshooting#upload[/url] for suggestions.



I had a look at the Troubleshooting guide and tried updating the COM port drivers with the drivers in the Arduino Sketch install dir, as well install the FTDI drivers. When plugging in the usb cable the RX light flashes a few time, and that happens also when I'm trying to upload something to the board. The troubleshooting guide says a green light should start burning when the board has power but that doesn't happen for me. According to the guide it may be because there's no bootloader on the device, but I'm afraid to start messing with that until that seems the most likely option. Not sure if I'll brick the device if I mess that up.

The troubleshooting guide says I need to check the serial port option in the Tools menu, but I only see a COM3 port there. Serial port is greyed out so I think that's the issue.


So I guess my computer can't find the Arduino, but I have no idea how to continue troubleshooting. I'd appreciate any thoughts or suggestions.

I just started working on an 8 year old Seeeduino I once bought, but never found the time/purpose for to work with. Now I do and want to see if it (still) works and I'm having trouble putting example code on it.

It's and old Seeeduino Mega 1.1 (date on the board says 06/24/2009) with the ATMega 1280 chipset on it. I've installed the latest version of the Arduino Sketch software, selected the right board/processor, opened an example (blink) tutorial and tried to upload it to the board. The following error messages pop up in console.

code:
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega1280"

Sketch uses 1470 bytes (1%) of program storage space. Maximum is 126976 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xe6
avrdude: stk500_recv(): programmer is not responding

<repeats for step 2 till 9> 

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe6
Problem uploading to board.  See [url]http://www.arduino.cc/en/Guide/Troubleshooting#upload[/url] for suggestions.



I had a look at the Troubleshooting guide and tried updating the COM port drivers with the drivers in the Arduino Sketch install dir, as well install the FTDI drivers. When plugging in the usb cable the RX light flashes a few time, and that happens also when I'm trying to upload something to the board. The troubleshooting guide says a green light should start burning when the board has power but that doesn't happen for me. According to the guide it may be because there's no bootloader on the device, but I'm afraid to start messing with that until that seems the most likely option. Not sure if I'll brick the device if I mess that up.

The troubleshooting guide says I need to check the serial port option in the Tools menu, but I only see a COM3 port there. Serial port is greyed out so I think that's the issue.


So I guess my computer can't find the Arduino, but I have no idea how to continue troubleshooting. I'd appreciate any thoughts or suggestions.


-edit-

Found the issue; I have 3 dipswitches on the Arduino. If I flip them all and upload again it does work, which was a suggestion I found on the seeedstudio forums.

LochNessMonster fucked around with this message at 08:12 on Oct 13, 2017

Sir Bobert Fishbone
Jan 16, 2006

Beebort
E: nm, I can't read.

Sir Bobert Fishbone fucked around with this message at 13:07 on Oct 8, 2017

wolrah
May 8, 2006
what?

LochNessMonster posted:

So I guess my computer can't find the Arduino, but I have no idea how to continue troubleshooting. I'd appreciate any thoughts or suggestions.

Based on the console log it looks like you've selected the generic Arduino Mega entry. According to Seeed's wiki they have their own board settings which you should install. I don't know if that actually matters considering the similarities between the boards, but it might.

As far as the serial port, the entry that says "Serial Port" is just being used as a header and is intentionally disabled. As long as you've selected the correct COM port below that you're fine. Check Device Manager if you're not sure, one of them will show up and go away as you plug and unplug the device.

LochNessMonster
Feb 3, 2005

I need about three fitty


wolrah posted:

Based on the console log it looks like you've selected the generic Arduino Mega entry. According to Seeed's wiki they have their own board settings which you should install. I don't know if that actually matters considering the similarities between the boards, but it might.

As far as the serial port, the entry that says "Serial Port" is just being used as a header and is intentionally disabled. As long as you've selected the correct COM port below that you're fine. Check Device Manager if you're not sure, one of them will show up and go away as you plug and unplug the device.

wolrah posted:

Based on the console log it looks like you've selected the generic Arduino Mega entry. According to Seeed's wiki they have their own board settings which you should install. I don't know if that actually matters considering the similarities between the boards, but it might.

As far as the serial port, the entry that says "Serial Port" is just being used as a header and is intentionally disabled. As long as you've selected the correct COM port below that you're fine. Check Device Manager if you're not sure, one of them will show up and go away as you plug and unplug the device.

I managed to fix it after 3 days of googling and a sheer 15-30 mins after posting here. My original post was already edited. I need to flip 3 switches on the board.

The link you posted is about the v4.2 version which is fairly new and has the 2560 chip, mine has the 1280. I'll have a look if there's also a set of board settings for my ancient version but with the default arduino mega 1280 processor settings I can upload example sketches so at least it works.

Parts Kit
Jun 9, 2006

durr
i have a hole in my head
durr
Anyone here familiar with the Adafruit Feather M0s? I'm poking around with the Serial1 port at the moment and am having an odd time with the inbound port buffer getting junk data, usually null but sometimes weird characters. Only thing I've noticed is the battery charger LED flickers before some junk data comes in. Nothing is connected to the pins yet.

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
I have managed to get the time (utc) from the wifi connection in the nodemcu but now I dont know how to use it in function. I want to, for example, turn a light on at 6am.

using:

code:
In setup
  // Time Config 
  configTime(3 * 1200, 0, "pool.ntp.org");
  Serial.println("\nWaiting for time");
  while (!time(nullptr)) {
  Serial.print(".");
  delay(1000);
  }

and in loop
  time_t now = time(nullptr);
  Serial.println(ctime(&now));

Sagebrush
Feb 26, 2012

What kind of number does the ctime function return? The NTP timestamp? An object containing discrete hours, minutes and seconds?

You'll need to work out some way of extracting the hours and minutes from the function. Then you can set a flag light_activated that toggles to 1 when (h == 06) && (m == 00), and which remains in that state until deactivated somehow. Then you just go if (light_activated) digitalWrite(whatever, HIGH) and your lamp goes on.

General_Failure
Apr 17, 2005
I've got a question.
I have an Arduino footprint ILI93xx 2.4" touchscreen TFT with parallel data pins. Sorry can't remember the model off the top of my head. I was looking at my 16x2 LCD and its I2c adapter board just now and realised that the required pins are pretty similar.

Does anyone think that the TFT board wired to an I2C adapter could potentially work? Ignoring the touch screen and SD card pins, about the biggest hassle I can see is the TFT has seperate read and write ins whereas the LCD I2C adapter has a RW pin. I guess demuxing it could work?
Yes I know the display would be hellishly slow. It's more of a thought experiment than anything else.

Splode
Jun 18, 2013

put some clothes on you little freak
Every parrallel set up I've seen for a display is different to every other one unless they're based on the same controller chip (is it visible?). The i2c adaptor won't be able to handle anything other than the display controller ic it was designed to convert. You might luck out though, there are a few very popular controllers out there

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

I'd like to mod a computer keyboard so that rather than all the keys together there is a long cable to each of 16 groups of 3 keys. This is sort of what I'm thinking. Looking for ideas as to whether this is a reasonable mod to do for a huge noob/baby. Thanks!

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!

awesomeolion posted:

I'd like to mod a computer keyboard so that rather than all the keys together there is a long cable to each of 16 groups of 3 keys. This is sort of what I'm thinking. Looking for ideas as to whether this is a reasonable mod to do for a huge noob/baby. Thanks!



If you're trying to solve an issue like ghosting in a way that n-key rollover does, you should look at how keyboard matrices work with and without diodes: https://deskthority.net/wiki/Rollover,_blocking_and_ghosting
If you're doing something else you're going to need to make a bunch of 3 key matrices and should probably take a look at that anyway so you're not using way more wires than needed.
It's possible to do it this way if you replace the keyboard controller with an arduino of some kind, although I'm not sure it makes sense since n-key rollover on a large keyboard matrix is a solved problem with diodes for each switch.

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Rexxed posted:

If you're trying to solve an issue like ghosting in a way that n-key rollover does, you should look at how keyboard matrices work with and without diodes: https://deskthority.net/wiki/Rollover,_blocking_and_ghosting
If you're doing something else you're going to need to make a bunch of 3 key matrices and should probably take a look at that anyway so you're not using way more wires than needed.
It's possible to do it this way if you replace the keyboard controller with an arduino of some kind, although I'm not sure it makes sense since n-key rollover on a large keyboard matrix is a solved problem with diodes for each switch.

I think you're over my head here. I traced the Q, W, and E keys back to the pins and connected them directly with a wire and it works so I'm going to go that route (take the keys, wire them directly to pins rather than using the plastic/metal print out). Anyways thanks for your input!!

Sagebrush
Feb 26, 2012

Splode posted:

Every parrallel set up I've seen for a display is different to every other one unless they're based on the same controller chip (is it visible?). The i2c adaptor won't be able to handle anything other than the display controller ic it was designed to convert. You might luck out though, there are a few very popular controllers out there

I think the chances of a 16x2 character display using the same controller as a QVGA (etc) TFT are infinitesimally small.

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
How complicated is it to get 2 micro controllers to exchange data over Bluetooth? I am thinking of the esp32 with built in Bluetooth and wifi with one unit being the main and the other controlling a couple of leds and sending their state back to the main?

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Pretty hard, the ESP32 doesn't have its bluetooth/BLE stack exposed fully last I heard. Bluetooth is also an annoying protocol in that one device is the central and others are peripherals that the central connects to and arbitrates the communication. This means the central has a lot of complexity (think your tablet or laptop is typically the central) and a lot of little embedded bluetooth chips don't support being a central (peripheral only). There's no concept of a simple point to point wireless network between two embedded devices with bluetooth, one has to be central and the other peripheral. I'd look at something like a 400 or 900mhz packet radio module, like: https://www.adafruit.com/product/3070 They're way simpler point to point wireless communication and take care of most of the gory details and let you just send and recieve bytes through the air like magic. If you need long range there are LoRa versions too that go about twice as far by using a more sophisticated protocol.

Lowen SoDium
Jun 5, 2003

Highen Fiber
Clapping Larry
That should be pretty easy to do over Wifi. You can have one ESP8266 in AP mode and the others in client mode. Then you just send your data as UDP or TCP back and forth.

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
Yeah sounds like I need to forget Bluetooth. The nodemcu8266 is cheap, small and easy so that’s probably my best bet.

Sagebrush
Feb 26, 2012

You should also consider the NRF24L01 modules. You can get them for like a dollar apiece in a 10-pack, and aside from an annoying header for breadboard use they work really well. I got like 50 yards line-of-sight out of one with a 31.25mm copper wire soldered onto the antenna trace. It's the chip that Logitech uses in wireless devices that aren't Bluetooth so you know it's good.

Use the RadioHead library.

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.

mod sassinator posted:

Pretty hard, the ESP32 doesn't have its bluetooth/BLE stack exposed fully last I heard.
BLE support actually got added to the ESP32 Arduino core a few days ago

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
Ordered a few NRF24L01 to give it a go as it looks perfect! I will probably only need 2 devices linked but 5 were £5 delivered on prime so...

Sagebrush
Feb 26, 2012

e: I forgot to add that you will of course need a microcontroller for each module, still. The modules are just the radio system. I've driven them just fine with everything from an ATTiny up.

Splode
Jun 18, 2013

put some clothes on you little freak

Sagebrush posted:

I think the chances of a 16x2 character display using the same controller as a QVGA (etc) TFT are infinitesimally small.

Yeah I think I skimread the post. I shouldn't post in here at midnight.

thegasman2000 posted:

How complicated is it to get 2 micro controllers to exchange data over Bluetooth? I am thinking of the esp32 with built in Bluetooth and wifi with one unit being the main and the other controlling a couple of leds and sending their state back to the main?

Depends. You can buy a bluetooth module, hook it up to your Arduino's UART, and have serial comms with a laptop instantly, with just the regular serial code as it functions as a bluetooth serial port.
Setting up one of the bluetooth modules to be a host is marginally more complex (in that it won't be set up out of the box) but still like, an hour's work max.

HC05 bluetooth module is what you want

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Follow up on my little keyboard hack project. I've mapped out 14 different 2 pin connections that each yield a different character and they work when I directly connect them with my copper wire. Each of these will lead to an arcade button by a 7 foot copper wire. My issue now is how do I get a solid connection between my wire and the pins (row of black rectangles on the bottom). I tried a lovely "glue wires on a wedge and tape it to the board" solution which worked not at all.

awesomeolion fucked around with this message at 22:53 on Oct 18, 2017

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
Scrape off the solder mask with an exacto blade and solder directly to the copper, then secure the wires with epoxy. Go slow and use lots of flux when you solder, and it should work fine. You'll never get anything to make decent connection to the carbon traces.

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

sharkytm posted:

Scrape off the solder mask with an exacto blade and solder directly to the copper, then secure the wires with epoxy. Go slow and use lots of flux when you solder, and it should work fine. You'll never get anything to make decent connection to the carbon traces.

Ah I see!! So under those are just wire. Excellent. I'll try this, thank you very much :)

Edit: When you say secure with epoxy, you mean glue the insulated part of the wire near the soldered end to something secure so if it gets pulled on it doesn't pull on the solder?

awesomeolion fucked around with this message at 23:08 on Oct 18, 2017

nishi koichi
Feb 16, 2007

everyone feels that way and gives up.
that's how they get away with it.
What's the best way to get a 16x2 lcd to display phrases at random when an rfid fob is tapped? I have the mfrc522. I'm still new to Arduino and can't seem to figure out code.

JawnV6
Jul 4, 2004

So hot ...
It depends on a lot of things (i.e. do you want to change the message or fade it out after some time?) but the general loop is going to be asking the RFID blob if it sees a new tag, then sending the result of that to the code controlling the LCD.
code:
loop() {
    newPhrase = check_for_rfid();
    if (newPhrase != NO_PHRASE) {
        send_to_lcd(newPhrase);
    }
}
This is pretty handwavey, but newPhrase is a enum or integer, NO_PHRASE is a fake value for when there's no new RFID tag detected.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

awesomeolion posted:

Ah I see!! So under those are just wire. Excellent. I'll try this, thank you very much :)

Edit: When you say secure with epoxy, you mean glue the insulated part of the wire near the soldered end to something secure so if it gets pulled on it doesn't pull on the solder?

There's copper traces, that's what the PCB is made from (epoxy substrate, copper traces, covered with solder mask). If you scrape off the mask carefully, you can access the bare copper and solder fine wire to it. I suggested epoxy of secure the wires after you've tested everything, because they'll want to snap off where you solder them if they aren't secured.

Sagebrush
Feb 26, 2012

bad posts ahead!!! posted:

What's the best way to get a 16x2 lcd to display phrases at random when an rfid fob is tapped? I have the mfrc522. I'm still new to Arduino and can't seem to figure out code.

The trickiest part of this is triggering the action when the RFID fob is tapped. Making the random phrase bit is easy.

If the library you're using has some kind of an interrupt system, or raises a flag when a new code has come in, then it's easy:

code:
if (rfid.newTagDetected == 1) {
  randomPhrase();
  rfid.newTagDetected = 0; //or whatever you use to reset the flag
}
If the library doesn't have some function equivalent to that, then you'll have to do it yourself. Figure out how the data comes in when you tap a tag. Is it a stream of numbers over the serial port? Does the library have a buffer that collects the last tag so you can analyze it? You'll need to hook into something that you can use to detect when the new data comes in. For instance, if it's just numbers over a serial port, you can do something like this:

code:
int buf[16];  //buffer for the serial port data; set length to the expected tag length
int a = 0; //counter for the buffer

while (Serial.available() > 0) {  //if there's something waiting to be read on the serial port
  buf[a] = Serial.read();  //read it and store it in the correct buffer position
  a++;  //increment the counter
}

if (a > 15) { //if the buffer's full
  //check if the tag is the right one, this is the stupidest way -- compare only the last digit
  if (buf[15] = 8) {  //or whatever number appears at the end of the tag
    randomPhrase();
  }
  //otherwise nothing happens
  a = 0;  //reset the counter
}
and the randomPhrase() code looks something like this:

code:
char* thePhrases[] = {"fart", "pee pee", "doo doo", "he is a bad president"};  //create array of strings
//note that strings in arduino are actually arrays of characters, so this is an array-of-arrays, hence the * pointer

void randomPhrase() {
  int r = random(4);  //generate random number from 0 to 3
  lcd.write(thePhrases[r]);  //write out the relevant phrase
}

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

sharkytm posted:

There's copper traces, that's what the PCB is made from (epoxy substrate, copper traces, covered with solder mask). If you scrape off the mask carefully, you can access the bare copper and solder fine wire to it. I suggested epoxy of secure the wires after you've tested everything, because they'll want to snap off where you solder them if they aren't secured.

Gotcha, thanks! Soldered one here and so far so good. Onwards and upwards :)

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

awesomeolion posted:

Gotcha, thanks! Soldered one here and so far so good. Onwards and upwards :)

Sweet, good luck. Remember, lots of flux!

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
So playing with a wemos d1 mini and one of the cheap 0.96” i2c oleds and while it detects there is an i2c device (on my i2c scanner sketch) I can’t get the demo code to do anything at all. So I guess the display isn’t foobar because it’s detected but is there likely to be an issue with the d1 and the library not being compatible?

This is the library.
http://www.rinkydinkelectronics.com/library.php?id=79

thegasman2000 fucked around with this message at 08:38 on Oct 19, 2017

LochNessMonster
Feb 3, 2005

I need about three fitty


So I've been looking around to see what kinda stuff I need for babies first electronics/LED strip project. I'm a complete beginner to electronics so I've been reading tutorials and trying to figure out what I need to order.

I've got an arduino clone up and running to drive the project but now I'm looking at what to purchase. I'm gonna start with 5m of NeoPixel RGB from Adafruit. For powering it, I'd probably need the 5V/10A power supply. Adafruit says they have this power supply you can use. When searching for local (ordering from the US will kill me for shipping/tax alone) I ran into a similar type but also stuff like this: http://www.meanwell.com/productPdf.aspx?i=399 . The latter being about half the cost of one of those "brick" power supplies.

What's the difference (besides the housing/case) and is there a reason not to use one of the meanwell power supplies? And how do I hook it up to a power outlet, or how doI hook the "brick" up to the ledstrip?

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!

thegasman2000 posted:

So playing with a wemos d1 mini and one of the cheap 0.96” i2c oleds and while it detects there is an i2c device (on my i2c scanner sketch) I can’t get the demo code to do anything at all. So I guess the display isn’t foobar because it’s detected but is there likely to be an issue with the d1 and the library not being compatible?

This is the library.
http://www.rinkydinkelectronics.com/library.php?id=79

I got a few of these on ebay a couple of weeks ago and had success with the Adafruit library and example sketch here:
https://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples
I'm using an Arduino Uno instead of an ESP8266 but all I had to do was run the I2C scanner to get the address and change that and the pins to A4 and A5 in the example sketch (those are the I2C pins on the Uno, I'm not sure what you have to do to setup I2C on the ESP).

Rexxed fucked around with this message at 18:07 on Oct 20, 2017

Adbot
ADBOT LOVES YOU

rawrr
Jul 28, 2007

LochNessMonster posted:

So I've been looking around to see what kinda stuff I need for babies first electronics/LED strip project. I'm a complete beginner to electronics so I've been reading tutorials and trying to figure out what I need to order.

I've got an arduino clone up and running to drive the project but now I'm looking at what to purchase. I'm gonna start with 5m of NeoPixel RGB from Adafruit. For powering it, I'd probably need the 5V/10A power supply. Adafruit says they have this power supply you can use. When searching for local (ordering from the US will kill me for shipping/tax alone) I ran into a similar type but also stuff like this: http://www.meanwell.com/productPdf.aspx?i=399 . The latter being about half the cost of one of those "brick" power supplies.

What's the difference (besides the housing/case) and is there a reason not to use one of the meanwell power supplies? And how do I hook it up to a power outlet, or how doI hook the "brick" up to the ledstrip?

Where are you located? The power bricks are easier to use since you don't need to buy separate cables and everything is in a neater package. You should be able to find 5V power bricks locally too.

I'd also see if you can buy the neopixels locally - search for something like WS2812 or SK6812 which is the led chips that the neopixel uses. Aliexpress will have them for much cheaper than adafruit.

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