#help-with-arduino

1 messages ยท Page 29 of 1

pine bramble
#

Possibly something to get into drivers/kernels with.

north kelp
#

Also, I highly recommend the Circuit Playground Express for new makers. You can get started super quickly in MakeCode, a drag-and-drop graphical programming environment that lives in your web browser.

While there isn't a sprinkler project on Learn, yet, here's one built on Circuit Playground Express that monitors houseplants:
https://learn.adafruit.com/soil-moisture-sensor-with-circuit-playground-express

Allows your plants to let you know when they need a drink.

torn frigate
#

can i extend a cable

#

with another jumper cable?

#

( plug into the other )

north stream
#

Yeah, I do that a lot.

#

Some signals don't like the extra length, but usually it's not a problem.

keen trail
#

hello

#

so im building some stupid robot that has 2 stepper motors and drives, and im trying to make it wireless. For controls theres raspberry that talks with arduino on serial and both run on a powerbank ,it works fine, but for stepper motors i needed 12 V power adapter for them to move

#

what would be best way to replace this adapter with some battery? chain of AA batteries or parallel 9V batteries?

#

weight vs power wise

north stream
#

I'd probably go with AA cells: they have an attractive power to weight ratio, and more current capability than even a few 9V batteries paralleled.

#

Alternatively, you could go for a 3S LiPo pack, and use it to power everything (the steppers directly, and the electronics via a buck regulator).

keen trail
#

for lipo battery i would need some mechanism to monitor the voltage to avoid destroying it right?

#

and for AA I could just grind them to death

north stream
#

Yeah, you'd want to use a protected pack, or an external battery management board. And yes, for single-use AA cells, you can just abuse them all you like.

keen trail
#

lets calculate

#

for 12 V i can put 8 AAs

#

i wonder how quickly it will die

north stream
#

An ordinary alkaline AA cell is good for about 1500mAh, but that varies with the discharge rate and duty cycle.

keen trail
#

its sad that this powerbank can provide 2 A at 5 volt

#

so maybe it should be good for these motors but its voltage is low and it doesnt work

north stream
#

You could use a boost converter, but 2A at 5V would only give you 0.7A or so at 12V.

#

An alkaline D cell offers a whopping 11000mAh.

keen trail
#

maybe i can make long and light cord to avoid this all GWchadLENNYTHINK

north stream
#

A somewhat sobering and inevitable part of engineering is the art of compromise.

red canyon
#

As servo motor is an Analog component, so why we can use digital non-PWM pins with it?!

iron shell
#

Any way to control Arduino from a website I make without having to plug into router via eithernet

candid sierra
#

wifi

#

bluetooth

#

radio

#

there are a ton of ways

#

but some are just more involved than others

patent vale
#

hello guys

#

quick question

#

I have this small fans, about 80mm diameters, they have 2 pins , I know one is ground but that is about it ,

#

is there a way to power it from my arduino, and turn it on or off?

#

and if so, which components would I need to use ?

#

I know so far I should not power up straight , but is there a way to add a resistor, transistor or something so I can power it using the 5v or 3.3v rail on my arduino but still be able to turn off or on?

patent vale
#

ok i have a mb v2 power supply , but no idea on how to use, I have on the same breadboard an lcd 1602, a dht11 temperature sensor and an rgb led, using the power supply will tap into the same rails as the 5v for all of the others but I just want to control a single small fan, is there a way or a safe way to set this circuit?

river venture
#

so fans pull a lot of power, if you want to control a 2 pin fan from arduino you need a mosfet or a power transistor to switch the power on and off via pwm

#

if you get a 4 pin fan you can just send a pwm signal to it, and read the ouput pwm signal to know the rpm

#

but since its both a high power load, AND an inductive load [because of the motor] , connecting it directly to your micro will damage the micro

patent vale
#

the 2 fans in question were usb powered directly before with no transistors or nothing

#

part of a pc cooling pad which I took apart

#

they are barebones 2 pins, I am attempgint right now a simple transistor connection however I dont understand a bit of the diagram, I could give you a picture of my current setup on my breadboard

river venture
#

usb's power lines are designed for that to some extent

patent vale
#

I am using a 220 ohm resistor , a transistor and a diode rectifier

river venture
#

though you are supposed to tell the usb host how much power you are going to pull

#

yeah go for it ill peek

patent vale
#

that board on the right is just the extension board, the arduino is connected to my pc so I can upload the code

#

the red cable on the left is the one going to the pwm connector on the arduino

#

the short red one on the right is to the 5v , and the long red one on the center goes to the fan

#

the green one is ground for the fan, the black one is also ground , the transistor is a pn2222

#

all the other connections are fine and tested, I just wanted to add a fan or 2, but I have no idea on the spec of this fans, all I know is that it was inside a cooling pad for laptops , old one that needed usb 2.0, and both fans were directly plugged in to a pcb with no resistors that just added a ground which was then plugged in to a usb port

river venture
#

hm i c, sounds like a dangerous cooling pad fyi lol

#

but let me see

#

hm not knowing how much current the fan draws complicates the math a little

#

there is no model number or anything at all?

patent vale
#

not even stickers

#

that is why I am going with 3v to 5v fans , they dont spin that fast eithers

#

also you would think that cooling pads hav something, but my laptop current cooling pad is basically 2 fans soldered to a cable

river venture
#

tbh thats a good design to kill a usb port
but your circuit here seems ok

patent vale
river venture
#

though

#

whats the model of your diode?

#

i think they wanted you to use a schottky diode not a rectifier

#

i think the main difference is that schottky diodes are faster but cant handle as much power as a rectifier

#

making them good for low power switching but bad for a power supplies full load

patent vale
#

n4007 diode rectifier

#

ok , so should I still use this ?

#

what I find weird is that both ground and + connectors on the fan are on the same rail as the diode , transistor

river venture
#

i dont think it will damage anything but you might find the pwm acting a bit weird

#

this circuit basically is turning on and off access to the ground

patent vale
#

I honestly just wanted a simple on /off connection but just couldnt find a schematic for a thing like that for 2 fans that did not involve a power supply

river venture
#

so its like you are connected from 5v to 'gnd' but through the transistor

#

technically though you lose a little voltage from the transistor

#

so more like 5v to 0.7v but it doesnt matter because its all relative anyway

patent vale
river venture
#

the fan still sees current flow and a voltage difference so it should work

patent vale
#

are you sure though, if you see, the 2 reds that are connected to one side of the rectifier, are basically 5v in and the fan + connector

#

then goes to the diode, which then communicates with the transistor and ground

river venture
#

yeah the diode is in parallel with the fan

#

the circuit is basically, the fan and diode are in parallel and have +5v at the top

patent vale
#

ok

river venture
#

then the transistor is a gate from the bottom of the diode/fan to ground

#

with the arduino turning the gate on and off

patent vale
#

ok ok i get it now

river venture
#

the diode helps eat your emf from the inductive load so it doesnt kill your transistor

patent vale
#

anyway, my issue is the code, I just wanted a simple on and off and not pwm speed control which is this based on

river venture
#

and the resistor is because the base on a transistor has almost no resistance and itll look like a short to ground on your pin

#

so you want enough current to activate the transistor gate, but not enough to burn out your arduino or waste power

#

ah

#

well if you knew the current that the fan pulled, you could see if the transistor can dissipate it

#

and then just leave it on

#

but since you dont, you prob want to pwm it to reduce the heat in the transistor

patent vale
#

this circuit I am making, at least from where I am following it , is for a 12v fan

river venture
#

yeah that just changes your resistor value

#

this circuit is pretty simple, so there is a slight risk that the transistor will overheat and die

patent vale
#

well Im gonna finish the code and test this to make sure

river venture
#

but your micro should be protected by the transistor and resistor

#

the resistor protecting it from a short in the transistor and the transistor itself protecting the micro from emf

patent vale
#

I have 4 extra transistors same model anyway. and rarely test around with them.

#

ok ok, thanks !

#

ok , forgot the guide I was following is for a DC motor

river venture
#

yw. yeah the resistor is important because even with a short, you can use ohms law to know how much current flows. v=ir so with 5v and 220 ohms its max v/r=i or 5V/220ohms = 0.023A

#

which is very small

patent vale
#

I am kind of regretting not going over what I learned on my circuits class a year ago

river venture
#

back emf can cause more but you wont see that because of both the diode AND the transistor itself

#

the transistor from base to ground is one way, so you cant get back emf

#

yeah circuits are pretty fun

patent vale
#

haha its suppose to be my career, but I am going for cyber security and rarely dabble back into circuits like now and I am lost

#

so , using a transistor like this, 4 of them to the same 5v rail, I would be able to lets say power 4 small wheels with dc motors as long as I make sure to protect the board ?

river venture
#

yes HOWEVER you prob want to use a more specialized circuit

#

because this doesnt support reverse

#

also if your motors jam, it can cause a lot of power to get pulled

#

and your circuit protects the micro, but not the power supply

#

you can make an 'h bridge' with just transistors, but regular ones will likely die pretty quick in real conditions

#

dedicated motor driver ic's/transistors usually have a heatsink

#

or at least are on a board or something to help dissipate heat

patent vale
#

yeah, I should order one, my kit didnt have one , just a stepper motor driver board and a power supply module that requires external power supply

#

ok

#

test 1 , didnt work, suddenly the rgb led did not turn on for some reason

#

I checked and after disconnecting power, both diode and transistor were really hot, along side the pins for the fan

#

not gonna test that anymore, after removing those, rgb light was on again

wet crystal
#

So for my next project just wanted to know if someone knows a tutorial, about how to save data to a nas direct from esp, without using a SD card.

For example if i run a weather station, logging every 30 mins, send data to a file in my nas.

#

My nas will be rasperry pi if that makes things easier

north stream
#

You'll need something to provide networking (ethernet, WiFi, whatever). Also, an Arduino doesn't have the horsepower to do a lot of network complexity, so the Pi will probably have to do all the heavy lifting.

wide lark
#

@wet crystal you should look into publish/subscribe patterns of sending data, that way your ESP devices can just "fire and forget" the data, no need to store anything at all

#

@wet crystal then your RPi can subscribe to and do whatever it needs with the data coming from your ESPs

#

@wet crystal I personally use Redis for this type of thing (and have code for both RPi and Arduino if you're interested) but there are a ton of ways to implement it. There are lots of MQTT protocol implementations that work with Arduino as well

wet crystal
#

Iยดm interessted in your code

wide lark
#

but as you can see, the Arduino needs no local storage at all: when it is time for it to fire a message, it gathers what it needs and sends it. if you wanted some averaging/smoothing you could of course maintain small in-memory data structures on the Arduinos (the ESPs actually have quite a bit of memory available at runtime for you), but you still wouldn't need persistent storage like SD cards. I've literally never bothered with the Arduino Storage APIs because I just don't need them.

#

in fact, even that RPi platform is designed so that it doesn't need to store anything. it absolutely can - you'll see tools in the bin directory to save the datastream to SQLite or ThingSpeak - but it doesn't need to.

#

in my home device cloud, the only thing that actually saves any data is my plain 'ol linux server

#

using this architecture makes it extremely easy to turn devices into storage-less readers of data too. I just recently made a "greenhouse monitor" using an ESP32 that consumes data coming from an RPI in my garden. please forgive the absolutely atrocious enclosure work: I am a software engineer, not a mechanical or product engineer ๐Ÿ˜† https://twitter.com/rpjios/status/1100077092287344642

Finished my #ESP32-based "greenhouse monitor" proof-of-concept last night. I'm a terrible enclosure designer with awful handwriting, but it is fully functional! Able to monitor any available data streams and is fully configurable remotely. https://t.co/IuI7Oh61hP FTW!

#

@wet crystal I'm headed out for awhile but feel free to ping or DM with any questions. best of luck! this stuff is fun , enjoy it!

limber bolt
#

Hi, is there anyone who could help me with this project, i am willing to pay as well.

#

Description: The main purpose of the device is that sensor can notice my leg bouncing (read the range of x,y,z, axis and recognize the pattern) and then if I am bouncing the leg (if the pattern of x,y, or z) is repeated for more than 4 seconds, then turn on pin which activates vibration motor UNTIL I stop bouncing leg. After I stop bouncing leg, the data would be called "Bounced 1 time", next time I bounce and stop, data would be updated to 2 instead of 1. So in the end of the day, I can open the file and read that I was bouncing and reminded for example 43 times throughout the whole day.

Standing / Sitting part is great, but it is not the main focus. The only reason why we have sitting and standing is: IF the person is standing, vibration should not work and data should not be collected. However,: IF the person is sitting, then operate the code for tracking bouncing as well as turning motor on if I am bouncing for more than 4 seconds. Again, motor works until I stop bouncing.

#

I use MPU 6050 sensor for this/

#

Again, if someone knows how to do this, I would pay as well.

torn frigate
#

anyone has soil sensors and cares to show me his readings?

#

this is mine during the night, haven't watered or touched the plants

#

the readings seem so random, sensor is YL-69

wet crystal
#

@torn frigate I donยดt have it setup atm. But maybe you check out this sensor. Itยดs meant to last longer.

I bought them too, for me they didnยดt worked on any other controller than the wemos.

All other of my friends i gave on of them had no problem on other ยตc

torn frigate
#

I have a wemos

wet crystal
#

๐Ÿ‘ Thats the only one worked for me. IDK why because you get a normal analog output from that

#

Even tryed naked atmega328 but no succes

#

startet many forum posts, but nobody had a clue

north stream
#

I had several ideas on it, and asked a bunch of questions to narrow it down, but people stopped replying to me so I dropped it.

wide lark
#

@torn frigate are these numbers sourced from the analog output of the YL-69 sensor (A0)? if so, those numbers look about right from the results I see with my soil sensors: "full" soil moisture tends to read about 700 on a 10-bit ADC (range of 0-1023) whereas "dry" soil moisture will read about 300. also, soil takes a while (like, a week) to dry out. so I think you need to just wait. also these sensors aren't very sensitive, hence why their range isn't very large.

torn frigate
#

yeah it's analog

#

would you recommend other sensor for more accurate?

wide lark
#

@torn frigate if you can find a more accurate soil sensor I'd love to know what it is, too ๐Ÿ˜ƒ

#

in fact, sadly, these sensors suffer from a problem far larger than limited sensitivity: corrosion. every one I've deployed has corroded to become nonfunctional within about six months ๐Ÿ˜ฆ

#

I have found a couple that operate by a different principle (honestly can't recall what that principle is right now) that supposedly prevents the corrosion or at least abates its growth. haven't ordered any of those yet, I kinda gave up on the soil moisture sensing idea because the sensors are too much of a PITA to deal with

torn frigate
#

thanks for the explaining and details! I might look for other sensors

#

I'll watch this one 2-3 more days, maybe I get more familiar w its readings

#

so I can use the water pump

wide lark
#

@torn frigate you're welcome, happy to help! definitely let us know if you find any other sensors that work well for you, and yeah give it some time and watch your readings, I bet you'll see them start to drop in a day or two

north stream
#

One easy method to reduce corrosion is to only power the sensor up briefly when taking a reading. The other approach is to use a fancier sensor like the $40 VH400 https://vegetronix.com/Products/VH400/

odd fjord
wet crystal
#

No not this one, this looks better

#

Also @north stream I sent one of the sensor to my friend, he tryed it out with his Arduino Uno and it worked for him he said.

native kelp
#

is there any way to receive arduino data through COM ports wirelessly?

#

like with bluetooth(if it's possible to connect to two devices on a windows laptop) or something like that?

wet crystal
#

You can have a second arduino with bluetooth

#

Connect that to COM port

north stream
#

Or possibly a USB Bluetooth adapter (and a shield or serial one for Arduino).

nimble terrace
#

I ordered it a week ago.... still not shipped

daring marsh
#

temperature too

nimble terrace
#

I think a very simple but nice product would be a sensor and an LED that is set to light when a a certain level of moisture, with a potentiometer like to set the level

#

@daring marsh is your sensor protected against corrosion ?

daring marsh
#

yes

#

there is no exposed copper at all

nimble terrace
#

it has nice design

daring marsh
#

๐ŸŒป

nimble terrace
#

and temp is important for roots too ๐Ÿ˜ƒ

#

I may get both

torn frigate
#

can i pull the source code

#

from my arduino board?

honest nimbus
#

No. You can pull the assembly code, which is the compiled version of the program, but you can't recover the source.

#

You can attempt to decompile it, but it'd be pretty mixed up with all the Arduino firmware and library code

ivory nest
#

Can i publish data in "void setup"?
I need to publish a data when plug in.

nimble terrace
#

publish ? yes you can do what you want in setup

modest birch
#

is it possible to connect 2 RFIDs PN532 to same pins? as default use A4,A5 (i2c) connection and i need 2 rfid but each of them will act to separate servo

north stream
#

Hmm, the PN532 only has one I2C address, so they'd conflict unless you went to SPI or UART, or used an I2C multiplexor.

elder rivet
#

Hi, i just got the MAX98357A breakout board, i'm powering it with 5V but i get no current consumption, it doesn't matter if i plug in the speaker or don't. I checked the schematic and i see the resistors being calculated to be used with 5V, somebody have a hint on why the module isn't consuming any current?

#

The speaker i am plugging in is 4Ohms

north stream
#

It shouldn't draw much if there's no input, maybe 2-3mA?

robust meteor
#

Hey!

#

Can I send a bit array from one arduino to another? ๐Ÿค”

north stream
#

The short answer is "yes". How to do it depends on a bunch of things (like how is the data stored, how are the Arduinos connected, etc.)

robust meteor
#

They would be next to each other, so maybe directly with one pin?

#

and the data... an array of bits or booleans of a fixed length

north stream
#

Yeah, you could use a serial link, and write the data directly with Serial.write(). The trick on the receiving side is to make sure it's in synch with the sender.

robust meteor
#

hmmm

#

thanks

#

Would that generate delay?

#

I need it to comunicate faster than 10ms

north stream
#

Should be doable, but you might need to craft a simple protocol to identify "this is the beginning of data".

robust meteor
#

what if, just before sending the data, I just HIGH one pin? ๐Ÿค”

#

So this way the other arduino knows when to listen

north stream
#

Yeah, you could use one pin for "I'm going to send a block" and another pin for the actual communication.

robust meteor
#

Hmm

#

thanks!!!

quartz smelt
#

is there away to figure out what is coming off 2 pins with one marked ground and the other maked INT

#

I do not have a scope

north stream
#

Multimeter? LED? Two pins of what?

quartz smelt
#

I believe it is 3.3v from my Geiger Counter, but the code on my Arduino, doesn't seem to be reading the pulses

lyric wagon
#

could you have the 3.3v trigger a transister (for 5v to the arduino input), and maybe use an interrupt?

#

you'd be good down to ~2.5v that way

#

if you don't own a multimeter, and you're sure the voltage is less than 5v, you could make an el-cheapo multimeter with an analog input, to give you an idea of what the geiger counter's putting out... or find the datasheet ๐Ÿ˜‰

#

also, paste the code.. maybe that's the issue

quartz smelt
#

I am using the Hazzah ESP8266, but just not having luck getting a count

river venture
#

might also need to mess with pull ups etc

#

or it might be analog and need an amp

#

whats the geiger counter model

lyric wagon
#

maybe your depleted uranium is too depleted?

river venture
#

haha

quartz smelt
#

LOL, no just counting background noise

lyric wagon
#

can you paste your sketch to pastebin ?

quartz smelt
#
#

As you can see there is a 3 pin next to a 2 pin opposite the power edge

river venture
lyric wagon
#
  1. interrupt the output interface, through this interface can be connected to the
    microcontroller and then displayed on the LCD.
river venture
#

supposedly at least

lyric wagon
#

Compatible with Arduino:
(recommended UNO R3 Arduino, or any other arbitrary with 5V and external interrupt INT)

#

like i suggest earlier.. you want to use an interrupt to catch the pulses

#

the pulses are likely too fast for a digitalread to catch every time

river venture
#

oh yeah digital read will 100% miss them

lyric wagon
#

specially if there's other stuff going on in the sketch

#

or just take it to chernobyl, you'll likely catch a few pulses there

#

but not in your bedroom

#

unless you have some shady secrets

quartz smelt
river venture
#

do you get a noise or led output?

quartz smelt
#

I can here it pulsing, I just can't capture the count

river venture
#

the schematic and that instructable indicate you should

#

icic

#

what does your code look like?

lyric wagon
#

yeah, he's using interrupts on that sketch

quartz smelt
#

I have used both the sketchs in step 5 and step 6

lyric wagon
#

ok

#

well he says the output is ~3v

#

try using that 3v to trigger a transistor

#

and have the transister pass 5v to an interrupt

#

maybe yours is outputting <2.5v

#

better still, a darlington pair.. but one transistor should do the job

quartz smelt
#

the middle pin says 5v

lyric wagon
#

ok, either way

#

you've confirmed you're getting output from it

#

audibly

river venture
#

the 3 pin header is vcc [5v?] signal then ground according to the schematic

lyric wagon
#

but it's not triggering a sketch you've used that relies on interrupts

river venture
#

the signal, i think is the one used to feed the beep and led

lyric wagon
#

so, i would assume that the voltages on the geigers output are too low for the arduino to trigger

quartz smelt
#

but I know the pin 2 that I pug into is 3 not 5

river venture
#

but i am not sure what level it is

#

j1 is attached to the speaker output and capacitively connected to ground

#

p2 is doing something with a 555 timer i am not sure what

quartz smelt
#

I don't know, but I saw where Big CLive on youtube did something with a 555 chip, but I don't see that on this build

river venture
#

i think p2 might be a proper signal when the geiger goes off but i am not super familiar with 555s

#

but it also seems to require that the switch is in a certain position to work

quartz smelt
#

I also believe its a pull down and not up

river venture
#

because hte transistor that pulls on it is only connected when the switch is a certain way

#

yeah it def looks like a pull down based on how the transistor is sitting

#

you might have to enable a pull up resistor if you use that port

quartz smelt
#

so not sure if that makes a different in the code

river venture
#

the code sample used the falling side of a pulse, so with a pull up resistor and this transistor pulling down i think it would work

#

is that red led on most of the time? or at least when you have a pull up?

#

there are two leds it looks like

#

one for the output signal and another that goes off when the speaker does

quartz smelt
#

one is power on and the other is a visual que that occurs when I hear a pluse

river venture
#

whats your schematic like?down below he has 5v to power, gnd to ground and vin to a data pin

#

using the 3 pin connector

#

this also looks like a more direct pull down circuit

#

with Q3 pulling it down t hrough a resistor

quartz smelt
#

to power the device I use the external power through USB, the Hazzah is also powered USB

river venture
#

sorry i meant what does your test circuit look like

#

so you have usb+ to pin 2 of P3 and usb gnd to pin 1 of p3?

#

then pin 3 of p3 to the micro?

#

oh i wonder if p2 is a clock that energizs the geiger counter, and hte pulse only travels through the geiger counter to the cathod if there is radiation?

#

not sure how these work

#

but p2 might be a steady clock output for some reason

#

i wouldnt mess with it since you are getting speaker/led outputs

quartz smelt
#

both boards are powered by USB, I then connect the grd from the counter to the ground of the hazzah. the int is connect to the pin labeled 2

river venture
#

what is int here? a pin on your micro?

quartz smelt
#

next one after 4 and 5 which I believe is i2c

#

no its a pin on the arduino

#

i mean the counter

river venture
#

ah is it part of the 3 pin connector?

quartz smelt
#

on the opposite end of the counter the 3 pins are marked gnd|5v|int

river venture
#

like that?

#

with data going to the arduino data pin

quartz smelt
#

yea

river venture
#

ok so it depends on your arduino a bit, but if you have a different model then he used you prob need to specify which pin you plugged in to.
i dont know arduino that well, but in step 5 that should be the line with digitalPinToInterrupt(2)

#

he plugged in to what looks to be labeled pin 2 on his

quartz smelt
#

and the other going to ground

river venture
#

yeah +pow to 5v or whatever from usb and -pow to ground

#

and that ground is shared between the counter and arduino

quartz smelt
#

which is what i did on the hazzah

#

it labeled 2

river venture
#

hm k

#

if i have the right board there

quartz smelt
#

on the hazzah 2 is also connected to the blue light

river venture
#

hmmm i would prob use a different pin then. according to the code he doesnt set a pullup resistor i think and that pin has one built in for the led. plus the led could cause issues

#

it doesnt seem to have anything special

#

and no pull up by default was mentioned here on this page

quartz smelt
river venture
#

ah yours might be a bit different lets see

#

i didnt see anyh notes about it

#

gpio 4 and 5 seem to just be regular gpio

lyric wagon
#

i went for food

#

just had a look at the schematic

#

you've probably already asked.. but

river venture
#

i think his issue might be the pull up and led

#

on his board

lyric wagon
#

the gnd on P2

river venture
#

the arduino sketch doesnt seem to enable one

lyric wagon
#

is it also connected to the gnd on your arduino?

river venture
#

he used the ground on p3

#

so i presume nothing is on p2

#

just for summary, he has p3.1 to ground p3.2 to +v and p3.3 to a pin on the board

#

which matches the instructable

#

and makes sense i think

#

i think the p2 side is output from the 555 clock circuit that feeds the anode of the geiger counter

#

and p3 is a 'processed' output from the cathode

#

removing jumper j1 looks like it cuts power to the feed circuit to the anode

lyric wagon
#

7:39

#

the pin labelled VIN is, apparently, the ouput

river venture
#

yeah very strange but i agree

quartz smelt
#

I spoke with Andreas, be he was not sure about the Hazzah

river venture
#

specifically, its connected to the cathode of the geiger counter glass sensor thing through a few resistors

#

i think if you switch to pin 5 and also adjust the code to use pin 5

#

you have a chance of it working

quartz smelt
#

ok, i will try that

river venture
#

i think IC1 555 is just a circuit to make the speaker and led do stuff. it isnt in the path of the actual counter

#

i think ic2 however is used to energize the glass sensor

quartz smelt
#

yea it has high voltage

river venture
#

oh i misread a dot, p3.3 [vin] is connected to a resistor and the top of transistor q3. q3 is activated by the cathode of the sensor and is in a resistor pair that divide the voltage

#

but its still where you want to be

#

it just that it does use a transistor to pull down

#

and it already has a pullup reasistor at r18

quartz smelt
#

thank you for your time

river venture
#

so i think the one built into pin 2 of your board for the led is likely messing stuff up

#

yw

quartz smelt
#

have a good night

stark surge
#

how to connect multiple nodemcus to the adfruit sever using mqtt liberary code

robust meteor
#

One question about serials

#

If I send a single boolean array, let's say it's 5 booleans, what will the serial.Available() on another arduino say? 5?

#

Let's imagine that the serial.available just recieved this boolean array once, and only this

north stream
#

I think Arduino stores booleans as bytes, and the Available() call gives the count of bytes available, so yes, I'd expect 5.

carmine halo
#

Can anyone tell me what the difference is between a logic level N-Channel MOSFET and a Logic Level Shifter/Converter is? Could I use a logic level shifter rather than 3 individual MOSFETs? I intend to use it to build a WiFi RGB LED strip with ESP8266 and Arduino.

solar sail
#

What are you trying to do with said components? Logic level MOSFETs are MOSFETs that are on at logic voltages

#

A level shifter can be a lot of things, depending on exactly what kind of level shifter it is.

marsh sleet
#

I just started using arduino. I tried to create a program to display a .raw image on a 3.2' screen. I converted a picture to .c format, but now it's too large "size of array 'fland' is too large". And i don't know how to fix this

honest nimbus
#

What is .c? And .raw is a camera raw, right?

marsh sleet
#

i have both a .raw and a .c file

#

don't know which one to use

honest nimbus
#

well no kidding that's too large

#

That's a 42 kilobyte array

#

an Arduino does not have that much RAM

marsh sleet
#

402 kB

honest nimbus
#

oh, sheesh

marsh sleet
#

i could use a SD card

#

to at least store it

#

but the .raw file is only 83 kB

honest nimbus
#

If you're doing that, you might as well save it as a bitmap image, too. There are helpful libraries for using those

#

It would also help to pre-process the image. Resize it to the screen's resolution and color depth

marsh sleet
#

okay so my question changed then. How to read a file from a SD card

#

i tried using SDfat

#

but i couldn't understand a thing

honest nimbus
#

There are SD libraries built in to Arduino

marsh sleet
#

i feel stupid

#

i just noticed that i try to use a .c/.raw file with a function called drawbitmap

honest nimbus
marsh sleet
#

i'm back to square one

#

no matching function for call to 'UTFT::drawBitmap(int, int, int, int, SDLib::File&)'

#

"You have to load the example in the ARM folder, not the AVR (DUE is ARM, all the others are AVR)" that one of solution i found online

#

but how can you do that ?

#

nevermind, it's not for the mega

marsh sleet
#

Okay i think i found what the problem is. I always get the error "no matching function for call to 'UTFT::drawBitmap(int, int, int, int, SDLib::File&)'". I think it mean something i do something using the library UTFT

north stream
#

The HTFT::drawBitmap() call takes a pointer to a bitmap, not a File object.

quartz smelt
#

@river venture I finally got it to work on pin 12 I ended up just trying every pin

river venture
#

nice nice

marsh sleet
#

i'm not sure i get what you mean, that mean it can't draw bitmap ?

#

that why i don't get the problem

#

and now that i think about it, even given exemple of the bitmap doesn't work

north stream
#

It can draw a bitmap on the screen from an in-memory representation of it. It does not have the ability to automatically read the data from a file and draw it on the screen. You have to fill in the missing piece by reading the data from the file into memory, then calling the routine to draw it on the screen.

carmine halo
#

@solar sail I see a bunch of projects using logic level MOSFETs, but one project uses logic level shifter. The only difference is that one RGB LED is 3 wire (WS2812B and uses logic level shifter) and the other is 4-wire (SMD 5050 which uses logic level MOSFETs)

nimble terrace
#

Hey I compared some cheap DHT22 and BME280 with other thermometers and it comes that DHT22 humidity is like 15 percent too high while BME280 temp is a few degree too high ๐Ÿ˜ฆ Is that usual ? any tips to fix it ?

#

Is there anyone using IOTappstory or another OTA service ? it looks powerfull

wide lark
#

@nimble terrace I have an outdoor system with both a BME280 and DHT22 that's been running for a few weeks (at least) and the DHT22's numbers are consistently higher than the BME280's, both temperature & humidity:

#

(DHT22 is on top on both plots, contrary to the title ordering. sorry about that. "Zero" is the name of the device, an RPiZW)

#

@nimble terrace I've used balena (back when it was still resin.io) for OTA and was impressed

nimble terrace
#

hey thx

wide lark
#

yw! ๐Ÿ‘

nimble terrace
#

your differences looks almost linear

wide lark
#

yup they are, good eye

nimble terrace
#

and not very big

wide lark
#

nope not that big at all, I'd say less than 15% as you've been seeing. so something else may be affecting your data, but I wanted to confirm that at least experimentally I've seen consistent differences between the DHTXX and BME280 sensors (have also tried with DHT11s)

nimble terrace
#

charting in different situation is the best way to improve my sensors

#

I put a little tape around the dht22, on the side, can it impacts readings ?

wide lark
#

as long as it's not fully covering the diffusion cover (the open grid thing) you should be ok

spice nacelle
#

@nimble terrace What is your reference ? How do you know they are too high ? You could set up a correlation between your sensors and the reference, and after a solid number of comparisons that cover a decent range of readings, you could apply a proportional or constant factor to correct your sensor data.

nimble terrace
#

Hey, I use an analog thermometer/hygrometer, and a laser thermometer as ref

#

yes bench is the way, I love data, consistency is a priority

reef wagon
#

I am a new user to the arduino community and would like to learn to code my Metro. Can anyone recommend an online tutorial or coursework (doesn't have to be free) for learning to code? I assume C would be the best fit, but I have heard a lot about python. I would like to incorporate the Metros into my high school STEM curriculum but I need to learn the coding first.

nimble terrace
#

What kind of Metro ?

nimble terrace
#

My mobile weather station

nimble terrace
#

Can 2 meters of wire impact DHT or I2C readings ?

nimble terrace
#

having a dht22, a photocell, an I2C bme180, 2 meters away from my ESP, can I share signal wires ?

lyric wagon
#

they look like very small metres

#

shouldn't be a problem, unless you're using 50 year old bell-wire

#

2 metres isn't all that much

nimble terrace
#

Ok thx

lyric wagon
#

you might have better luck with ethernet cable

#

but 2 metres is probably close to the limits of i2c

nimble terrace
#

ethernet will be cheaper than electronic cable at my local shop for sure ๐Ÿ˜ƒ

lyric wagon
#

just dont go sending 2A @ 60V down it ๐Ÿ˜›

#

i'm not sure what it's rated to, to be honest..

nimble terrace
#

how you know Im buidling a heater ?

lyric wagon
#

hah

#

a kanthal element will last longer that an ethernet

#

and be far less toxic

nimble terrace
#

It works bme280 on 2 meters of 20 awg

vagrant merlin
#

I have Trinket M0 and when I try and use the ardunio joystick class with the Trinket M0 I get an error saying PluggableUSB.h is not found. Any idea what may be wrong?

leaden walrus
#

@vagrant merlin have installed all the board support packages? can you get the basic blink example to upload and run?

vagrant merlin
#

Yes no problem I can get the Trinket to blink and run simple programs. You can try to compile the program below for Trinket M0. On my system I get the error C:\Users\kglas\Documents\Arduino\libraries\Joystick\src/DynamicHID/DynamicHID.h:37:28: fatal error: PluggableUSB.h: No such file or directory

#

#include <Joystick.h>
void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}

#

The same program will compile correclty for the Ardunio Leonardo

leaden walrus
#

where did the joystick library come from?

lament mauve
#

Hey !

#

I'd like to make an addressable system with one master Arduino and multiple Arduino slaves. Slaves would have multiple connector to connect to other slaves, I would like slave to send back to master to who they are connected. Like Slave1 is connected to Slave2 on port 1 and to Slave3 on port 2

#

To make a virtual "mapping" of the devices

honest nimbus
#

That sounds like a job for I2C, though not precisely fanned out like that... But possible depending on the wiring

#

Oh

#

That's more like a mesh network

lament mauve
#

I'd like to make an GUI that show how devices are connected when you boot the system

#

Not only showing how many devices but how they are connected

honest nimbus
#

I'm thinking about it, it seems like what you could do is a cell network. Like each device is independent about figuring out who is near it

#

So like, have them as "Who is on my left connector?" and store that info

lament mauve
#

I have almost no knowledge into this

#

Yes totally

#

You got the point

ocean widget
#

you could look at how arp works and maybe do something like that

lament mauve
#

I saw UART could do the job ?

honest nimbus
#

Then have the master device ask for each slave-cell's connection data and compile it

#

UART and software serial would be a good and very simple way to do the actual communication

#

The logic of which serial line goes to which connector would be something you write in

lament mauve
#

Wouldn't it be easier to have each slave connector on a different pin of the slave MCU ? Then slave MCU would send everything back to Master in a single wire ?

#

I don't know where to start, do you have any source or maybe someone who already done this ?

honest nimbus
#

You could have an extra serial line for master communications, sure

lament mauve
#

I want Master device to be able to be connected on any of thoose slave port

honest nimbus
#

But once you have the mapping, you could establish a "route" to the master through the device-to-device connection

#

UART would be good because the master just needs to transmit once and all the slaves can listen in to the same line

ocean widget
#

this might help you get on the right track

honest nimbus
#

I can't find anything directly on cell array electronics right now, but the general concept is "cellular automata" - independent actors that only know about things directly next to them and behave by simple rules, but which gives rise to complex and ordered behavior

lament mauve
#

I don't find anything under cellular automata

#

Found more stuff about "addressable" master slave

#

But still, I'm too confused about what I find and also doesn't seems to look like what I would like to do

ocean widget
#

also not sure if you have experience with driving leds but im trying to use this https://www.digikey.com/product-detail/en/rayvio-corporation/RVXR-280-SB-073105/1807-1024-ND/8635410 but am not really sure what resistors or extra components i need to use it correctly

lament mauve
#

With arduino ?

ocean widget
#

ye

lament mauve
#

Uh

ocean widget
#

hopefully a feather

lament mauve
#

Why arduino ?

#

Isn't an addressable led

ocean widget
#

ye want to use some other sensors along side it

lament mauve
#

Use your Arduino to control a relay

#

Use a capacitor in parrallel as always

ocean widget
#

that is an option. would i be able to power it with a battery if i used a relay?

lament mauve
#

Relay is like a switch

#

So if your battery acheive the requirement of your LED yes of course

ocean widget
#

gotcha gotcha

north stream
#

You'll need a battery that supplies more voltage than that LED needs (7V) and a current limiting resistor. Other than that, you could control it with a transistor.

#

You'll want to be careful of UVC emitters like that, however: they can ionize air, damage skin and eyes, and cause other issues.

ocean widget
#

yeah i bought eye protection and dont plan on having it pointed at anyones skin

#

so if im using this right http://ledcalc.com/ i would need a 27 ohm resistor to use a 9v to power this

north stream
#

Yeah, 27ฮฉ should give you about 74mA, which is a reasonable amount of current for that LED.

ocean widget
#

thanks

arctic shore
#

hi is this for help with the M0?

#

Hi is this the right room for help with the M0 boot loader?

north kelp
#

What's up with your M0, @arctic shore ?

burnt sluice
#

Could someone answer a question about the Ultimate GPS Breakout Board? Is it possible to get milliseconds from the time/rtc? I'm playing around with it, and have noticed that all the times I have seen returned have 000 milliseconds.

#

All the serial debugging examples on the Adafruit site all show 0 milliseconds as well.

wide lark
north kelp
mystic gate
#

Hello people, can you help me? i have a nodemcu esp8266 and i want to make a relay iot, all good, but i would like to put a switch that tell to the d2 pin that when is activated toggle the relay, but for some extrange reason conecting the d2 pin to ground does nothing, and even the loop function is called once every 20 seconds or so, can someone help me? here is the code.

north stream
#

Maybe use INPUT_PULLUP instead of plain INPUT?

mystic gate
#

ahhhh ok will try

burnt sluice
#

Thanks!

mystic gate
#

@north stream thanks! now it works! but the loope is called every 20 seconds, (more or less), what can i do to change that?

#

change the bauldrate? (Serial.begin(115200);)

north stream
#

Not the baud rate, probably. However I have shut down my computer for the night and don't have a way to examine the code on my phone.

north kelp
#

Your baudrate's fine.

pine bramble
#

I do the same thing. Once the computer is off it stays off.

honest nimbus
#

20 seconds happens to equal the timeout you set (20,000 ms) in the MQTT update block

#

That suggests that the thing is not actually able to reach Adafruit IO

north kelp
#

@mystic gate What's your Serial Monitor show? I'd imagine it's trying to connect and not connecting.

mystic gate
#

@north kelp it conects normally, the problem is that is calling the loop function very slowly

north kelp
#

Also, in MQTT_connect() there's a delay(5000).

honest nimbus
#

also what is while ((ret = mqtt.connect()) != 0) { supposed to be?

#

that assigns ret to mqtt.connect and doing that successfully returns true

mystic gate
#

yeap

north kelp
#

@mystic gate I'd try commenting out all the MQTT. I think you'd find your loop() runs 1000s of time a second.

mystic gate
#

ok will try

north kelp
#

I know that doesn't solve your issue, but it should focus on what's slowing things down.

mystic gate
#

the MQTT_connect function just returns when the conextion of mqtt is successful

honest nimbus
#
      while (1);
    }```
#

just....

#

Sit around in an infinite loop until timeout?

north kelp
#

Are you watching your Serial Monitor? Do you see messages like "Retrying MQTT connection in 5 seconds..."?

mystic gate
#

i didn't make the code, it works so far but i think i need to optimize it

#

no the seria monitor is fine,

honest nimbus
#

Whoever did write this totally needs to comment it before giving it someone else

mystic gate
#

and the grand winner is!! @honest nimbus

20 seconds happens to equal the timeout you set (20,000 ms) in the MQTT update block
That suggests that the thing is not actually able to reach Adafruit IO
#

it worked when i lower that number

#

thanks to all! ๐Ÿ˜„

north kelp
#

If the timeout is being reached at 20 seconds, then you're still having an issue with connecting to Adafruit IO, I'd imagine. Shortening that to smaller fixes the push button, but not the logging/connectivity.

honest nimbus
#

I am pretty sure that if you want to do this a second time, you should entirely rewrite the code, but I'm glad you achieved your immediate goal!

north kelp
#

Check your Adafruit.io credentials. I'd add more code to confirm that connectivity, authentication and logging is happening.

mystic gate
#

well you two are right, and i will.

north kelp
#

I'd at least add this comment:

    if (retries == 0) {
      // Ghost the user, and give no clue what went wrong.
      while (1);
    }
#

๐Ÿ˜‰

mystic gate
#

haha yeah you're right

north kelp
#

Better is:

    if (retries == 0) {
      Serial.println("Gave up trying to connect to MQTT.");
      while (1);
    }
mystic gate
#

i think that code is just depresed ๐Ÿ˜ฆ

north kelp
#

Cheers, @mystic gate ! Let us know of your progress.

mystic gate
#

thanks! ๐Ÿ˜„ will show you mah project soon

nimble terrace
glacial light
#

hi there !
@nimble terrace I can't provide you such data, but this is very graphic ;)

( what brings me here ) Does anyone know where I could find magnetic latching solenoids working from 3V or 5V ? ( I wish to replace a mini push-pull type for a project that'll run on battery, so I'm considering switching the solenoid used for the lock mechanism to decrease current drawn by the setup). Thanks in advance ๐Ÿ˜ƒ

north stream
#

Do you want push or pull?

glacial light
#

@north stream hi ! & thanks ๐Ÿ˜ƒ ->I'm checking those ..

#

@north stream if I understand the datasheet correctly, it's indeed a latching one, and we just have to reverse the pins to change the direction it'll latch to -> I guess you made my day ;p ( now onto finding the suggested way to drive those .. )

north stream
#

The usual way to do that is a circuit known as an "H-bridge".

glacial light
#

all right, I used that whle driving a motor, so it should be ok ;p
-> big thanks :)))

swift plume
#

I've been away from C for about 20 years. Why doesn't the following work?

#

int intArr[] = {0};
int intArrArr[][1] = {intArr};

#

error: array must be initialized with a brace-enclosed initializer

#

Slightly modified and it does work with java. To feed an 8x8 led matrix I want a 2 dimensional array of bytes to store bitmaps to animate.

north stream
#

It's sneaky: intArr is of type int *

honest nimbus
#

Arrays of arrays are not commonly used in C, though it does work as a way to specify a multidimensional array...

north stream
#

You could do it with ```c
int * intArrArr[] = { intArr };

honest nimbus
#

Oh, also, the order of dimensionality matters.

#

I bet changing ```int intArrArr[][1] = {intArr};

#

to int intArrArr[1][] = {intArr};

#

would work as you expect

swift plume
#

That fails to compile, you have to specify all but the first dimension. Defining [1][1] fails too

#

int i[][1] = {{1}}; works too so I can rewrite it like that. I am just surprised that I cannot assign an int[] as an element in an int[][].

north stream
#

It's a type mismatch: int[] isn't an integer.

honest nimbus
#

Yeah, I'm not great at data types, but a C array is a pointer to a linked list IIRC

swift plume
#

I know.

north stream
#

Which is why I suggested (since you're already building the inner array) making the outer array an array of int * pointing to the inner array. Realistically, I just use one-dimensional arrays most of the time (which works with a lot of LED controllers and other peripherals just fine, just need to do a little math to map coรถrdinates to addresses).

swift plume
#

int * int[1] works for what I want so I'll go with that.

north stream
#

A C array is a pointer, but not to a linked list, just an area of memory with values arranged consecutively.

swift plume
#

Sorry I meant an element of the outer array part. A row so to speak.

north stream
#

Alternatively, you could just initialize the whole thing at once: ```c
static int intArrArr[][3] = {
{1, 2, 3},
{4, 5, 6}
};

swift plume
#

I still thought {intArr,...} would assign the consecutive memory. I guess I would have to use multidimensional arrays of pointers to be able to define each image ahead of time. I am so used to working with objects that I've forgotten how memory allocation in C works ๐Ÿ˜ƒ

#

Thank you.

nimble terrace
nimble terrace
#

Testing with 2 sensors only does not mean much :/

#

Do you know some public weather API ? this could help for calibration

arctic shore
#

Hi I have a quick question about my M0

#

I know my data cable is good. because I've written sketches to other boards with the same cable.

#

and in fact I have a duplicate M0 rfm900 feather.

#

my problem is that I can no longer upload sketches to that one feather.

#

the Led just keeps flashing according to the last sketch that was uploaded.

#

any suggestions? When I try to kick iit into boot loader mode. I can see it show up for a second in the verbose messaging but then it unloads. nothing shows up in the USB buss.

#

when I hook up a different feather m0. it clearly see the device.

#

any suggestions ?

#

more specifically, Is it problem with my computer setup (I had issues trying to load the usb drivers for another 8266 board. and was worried I might have deleted a file somewhere)?

#

and yes I got the silicon labs driver to work so I know the cable can upload sketches.

little nimbus
#

anyone got api advice? every tutorial ive follower has broken, i think the libraries they use are outdated now and i dont know what i can do ):

nimble terrace
#

@little nimbus api means nothing nowdays

#

or it means too many different

north kelp
#

@little nimbus What are you making? Which API is giving you problems?

little nimbus
#

openweathermap

#

every tutorial says to use arduino http client library but i think it's whats giving me errors

lyric wagon
#

@little nimbus the tutorial on the official arduino site doesn't work for you?

little nimbus
#

yeah

#

Multiple libraries were found for "ArduinoJson.h"
Used: C:\Users\User\Documents\Arduino\libraries\ArduinoJson
Not used: C:\Users\User\Documents\Arduino\libraries\CoogleIOT
Not used: C:\Users\User\Documents\Arduino\libraries\Antares_ESP8266_HTTP
exit status 1
StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6

#

im p new to arduino and coding in general, i just have no idea what is happening here

wide lark
#

@little nimbus Arudino IDE looks in all the library folders for header files you include, and that means it's possible it may find multiple versions of the same header file, which is what's happening here. the "ArduinoJson5" warning is an entirely separate warning from the multiple-library warning (you have two showing up there)

#

if you don't need them, you could just remove CoogleIOT & Antares_ESP8266_HTTP libraries, and upgrade the ArduinoJson library to version 6 from the Library Manager. that should make these warnings go away and get your sketch compiling.

little nimbus
#

thank you so much for helping

#

ill try now

wide lark
#

@little nimbus you're very welcome! best of luck

little nimbus
#

ok so those errors went away! but now i'm getting
cannot declare variable 'client' to be of abstract type 'WiFiClient' for
cannot declare variable 'client' to be of abstract type 'WiFiClient'

wide lark
#

yeah, that means that the compiler now can't find the definition for WiFiClient: what device are you using, an ESP8266 I'm guessing? You'll still need an ESP8266 Arduino core, which will include the WiFiClient class (among others)... there are many different types of ESP8266 boards you can chose from, try to pick the one closest to the actual device you're using.

little nimbus
#

yeah i've got a feather huzzah esp8266

#

i got wifi working for some other programs so i'll see what library i used there

#

thanks again

#

oh my goodness!!!

#

the whole program is working

#

thank you so much this has been plaguing me quite a bit

wide lark
#

@little nimbus that's fantastic, very glad to hear it! you're more than welcome, I'm really glad you're up and running ๐Ÿ‘

#

I love those little Huzzah feathers, so powerful in such a little package. have fun!

little nimbus
#

i will now lol!

wide lark
#

๐Ÿ˜„ ๐Ÿ‘

nimble terrace
cerulean pagoda
#

Hi, can anyone tell me what screen this is?

#

I cant find it anywere

#

Looks like a real adafruit tft but i dont want to bid on it if I cant find any information about it =/

solar sail
cerulean pagoda
#

it certainly does

#

Thank you

solar sail
#

You're welcome ๐Ÿ˜ƒ

tropic plume
#

would anyone care to help me configure my NFC shield with arduino uno v3?

cerulean pagoda
#

๐Ÿ‘Š

tropic plume
#

however, i follow those instructions

#

but am returned in the serial monitor that no NFC reader is found

#

or more accurately, ""Didn't find PN53x board"

north kelp
tropic plume
#

sure, thats where I found the above link ๐Ÿ˜›

#

however, thats the only link that exists on the shield

#

and the instructions are super outdated.

#

ah okay i got it to work

#

i just adapted adafruits

#

does this look about right for an unformatted nfc tag readout

north kelp
#

I think your Serial Monitor needs to be at a different baud rate. Probably 115,200.

tropic plume
#

it was 115,200, however on that s creenshot of tutorial it was 9600

#

ill try that

#

Found an ISO14443A card
UID Length: 4 bytes
UID Value: 0xD4 0x93 0x69 0xB5
Seems to be a Mifare Classic card #3566430645

#

perfect ๐Ÿ˜ƒ

north kelp
#

Sweeet!

tropic plume
#

thanks mate.

#

im very new to this stuff.. i had a vision one night of a product i wish to create. im trying to materialise on it, as so many other inventions of mine i never gave much time to.

north kelp
#

No worries!

tropic plume
#

so now, step one done

north kelp
#

Take it a step at a time. I like to focus on the magic first.

tropic plume
#

yeah. i had a crack yesterday at making a small audio amplifier with an lm386

#

went quite well. super fun toying around with it

north kelp
#

You may already know all of these, but check out distributors that may be more local to you in Aus, in the South Pacific section:
https://www.adafruit.com/distributors

tropic plume
#

ah, sadly canberra is the closest.. about a 2 hours drive away

north kelp
#

I'm in the San Francisco area. I lived in Melbourne and Sydney for almost 6 months a few years back.

tropic plume
#

oh awesome mate

#

i live in sydney, but how much better is melbourne !

north kelp
#

Well, at least shipping would be closer, faster, and likely cheaper.

tropic plume
#

yes. i will probably do that if i face any more troubles with this outdated thing. i was just too impatient to get going ๐Ÿ˜›

north kelp
#

Melbourne:Sydney :: San Francisco:Los Angeles

tropic plume
#

i see, my brothers being to san fran and he loved it.

#

id love to go to america .

#

hey how experienced are you will arduino and such, like c++ ?

north kelp
#

I'd love to go back to Australia for a bit. We'll have to find a project that requires both of us traveling back and forth. ๐Ÿ˜„

tropic plume
#

aha this is the right place to link up like that.

north kelp
#

I've been doing Arduino for a few years.

tropic plume
#

i really want to got some maker groups in syd

north kelp
#

Did you have an Arduino/C++ question in mind?

tropic plume
#

well, more of a request. i am really looking for someone in the community whom i can pay a rate thats agreeable to both of us, for some fast track coaching. some years ago i was thrown in the deep end at an architectural firm because i said I knew how to use solidworks.... i didnt... but I took a crash course on skype by an awesome canadian dude and paid him for it,

#

kept that job for years ๐Ÿ˜›

north kelp
#

Wow. Good job. My coworkers use SolidWorks.

tropic plume
#

the coding aspect of my project is very simple

north kelp
tropic plume
#

i just dont have the time to learn and tinker with c++ with other things on my plate

#

if it were in plain english i could describe the actions and function.. when so and so happens trigger x event etc etc

north kelp
#

Have you looked at MakeCode at all?

tropic plume
#

never heard

#

looking at it now

#

is that just basically what i described?

#

a tool which can translate plain english to half efficient code?

north kelp
#

Not quite, but likely easier than C++.

tropic plume
#

mate this looks perfect for now

north kelp
#

It requires a more powerful microcontroller than the classic UNO. The Circuit Playground Express is the best platform for it right now.

tropic plume
#

is it quite extensive in the sense it can identify and handle all the different sensors that arduino has?

north kelp
#

The CPX has a number of built-in sensors. But you can also attach external sensors, just as on an Arduino.

tropic plume
#

cool, like a nfc reader? ๐Ÿ˜‰

north kelp
#

And for things not supported in MakeCode, like an NFC reader, you can also code the CPX with Arduino C++ or CircuitPython.

#

Someone somewhere may be writing an NFC extension for MakeCode. Or perhaps you will.

tropic plume
#

what im doing right now is just trying to get a working, albeit primitive, prototype to take to my patent lawyer

north kelp
#

That's a good step. I applaud the primitive part.

tropic plume
#

i like the idea, for people interested in progression, and i defniitely am interested in progression because ive learnt this is super fun

#

however i need to pump this out, get it refined, patent pend it, take it to an electrical engineer and get some pcb's made

#

gotta make shark tank by 2020 ๐Ÿ˜‰

north kelp
#

Nice

#

I'm off to get coffee. I'll be around.

tropic plume
#

enjoy, thanks for the info

solar badger
#

I am having trouble getting ESP.deepSleep() working on an ESP8266 feather Huzzah. I have replaced the delays in the blink example sketch with ESP.deepSleep(2000), and connected the wake pin to reset. However the board rapidly resets over and over no matter what value I put in for the deep sleep time. Any idea what Iโ€™m doing wrong?

rain horizon
#

Hello

#

I'm trying to work with a Motor board and cant get it to work for me

#

its probably my wiring

#

does anyone have a pic of how one should be wired

spice nacelle
#

Which one do you have ?

rugged steppe
#

Please help or tell me your opinion...
I have been trying to use ArduinoMenu (https://github.com/neu-rah/ArduinoMenu) with board Adafruit ItsyBitsy M0 Express (framework = arduino in Platformio) and have troubles with it. This library is working OK with e.g. Arduino Nano, Mini etc. It seems that the input characters are treated incorrectly... somehow delayed or lost. So it means that this library is unusable in this environment... with ItsyBitsy_m0. Is it a bug in the library or in the USB interface? Any help would be appreciated.

crisp talon
#

hi quick question so I am using a adafruit bluefruit nrf52 and a teensy 3.2 so I can do uart communication and it is not working . does anyone know if those boards just don't support uart communication? if they do does anyone have any tips?

little nimbus
#

i'm back again lol! ive got my wifi working finally for my feather huzzah, now i want my weather data to print to serial

#

instead of printing to serial it just seems to do nothing though

#

  Serial.println("\nStarting connection to server...");
  // if you get a connection, report back via serial:
  if (client.connect(server, 80)) {
    Serial.println("connected to server");
    // Make a HTTP request:
    client.print("GET /data/2.5/forecast?");
    client.print("q="+location);
    client.print("&cnt=3");
    client.print("&appid="+apiKey);
   // client.println("&units=metric");
   client.println("Host: api.openweathermap.org");
   client.println("Connection: close");
   Serial.println("closed connection");
   client.println();
  } else {
    Serial.println("unable to connect");
  }

  delay(1000);
  String line = "";

  while (client.connected()) {
    line = client.readStringUntil('\n');
    Serial.println(line);
  }
}```
#

here's my function for it ):

#

all advice welcome!

north stream
#

When you say print to serial, do you mean an actual serial port, or a USB emulated one?

little nimbus
#

the actual built in arduino serial

nimble terrace
#

do you have a Serial.begin ?

#

nice function, i will reuse it, I need a weather API too

little nimbus
#

yeah i do

#

the serial displays the wifi connection

#

but it doesn't display anything else

#

and thank you, except it doesnt work lol

nimble terrace
#

yet, but it will

little nimbus
#

i hope so it's very frustrating

nimble terrace
#

debuging on arduino is not easy, but this is part of the game

little nimbus
#

aha

nimble terrace
little nimbus
#

i think an issue was closing the connection, i've deleted that and now it's displaying the data

nimble terrace
#

got it to almost work on esp32

little nimbus
#

what did you change?

#

i think you just need the OWM key

#

which you get by signing up

nimble terrace
#

yes i used a random one without succes ! I should subscribe

#
// ********************************  Wifi

#include <WiFi.h>
#include <ESPmDNS.h>
#include <WiFiClient.h>
#include "WifiCredential.h"

WiFiClient client;
byte CONF_MAXWIFICOUNT = 10;

void connectToWifi() {

    WiFi.begin(ssid, password);
    byte wifiCount = 0;
    while (WiFi.status() != WL_CONNECTED) {
        wifiCount ++ ;
        if ( wifiCount >= CONF_MAXWIFICOUNT){
            Serial.println("Wifi Failed");
            return;
        }
        delay(500);
    }
    return ;
}

const char* host = "api.openweathermap.org";
const int httpPort = 80;
int location = 12345;
int apiKey = 1234;

void getWeather() {

    Serial.println("\nStarting connection to server...");
    // if you get a connection, report back via serial:
    if (client.connect(host, 80)) {
        Serial.println("connected to server");
        // Make a HTTP request:
        client.print("GET /data/2.5/forecast?");
        client.print("q="+location);
        client.print("&cnt=3");
        client.print("&appid="+apiKey);
        // client.println("&units=metric");
        client.println("Host: api.openweathermap.org");
        client.println("Connection: close");
        Serial.println("closed connection");
        client.println();
    } else {
        Serial.println("unable to connect");
    }
    delay(1000);
    String line = "";
    while (client.connected()) {
        line = client.readStringUntil('\n');
        Serial.println(line);
    }
}

void setup(){
    Serial.begin(9600);
    connectToWifi();
    getWeather();
}
void loop(){}
#

this codes works on esp32

#

I will test more later on, beer time !

little nimbus
#

thanks for helping!

#

i tried that code, but my seiral just prints

#

Starting connection to server...
connected to server
closed connection

little nimbus
#

got it all working thanks to everybody!!!! x

crisp talon
#

hi i asked this question earlier but no one answered so i'm still stuck. I am using a adafruit bluefruit nrf52 and a teensy 3.2 so I can do uart communication and it is not working . does anyone know if those boards just don't support uart communication? if they do does anyone have any tips? I got it to work between teensy 3.2 and arduino uno just the bluefruit nrf52 does not work

north stream
#

I'd test if the nRF can receive and transmit individually.

fallow harbor
#

I've got a quick Arduino question. So I bought this module online and it is a multi-function module with temperature, RTC, humidity and other functions on-board all displayed on an LCD, but I checked and there apparently looks to be a serial port on the back. I want to feed the info all into an Arduino so what is my first step in doing that?

north stream
#

I'd try to dope out which pins are which then look for serial data.

#

Probably worth eyeballing the IC to see what it is (there's a reference to a "1302" in the product description, but I don't recognize that part number).

fallow harbor
#

I will have a closer look when I get home.

#

It says the main MCU is the STM8S105K IC.

north stream
#

Ah, should be able to buzz out which pins UART2_RX and UART2_TX go to on that connector.

fallow harbor
#

Yeah.

#

I will try all of this once I get home and I will update you with the results!

#

Should be a good test, I've never personally messed with hacking built devices before.

crisp talon
#

@north stream how would i test if it can receive and transmit individually?

north stream
#

Since you have two other boards that can communicate, you can use a known-good one to send and see if the nRF receives. Similarly, you can use a known-good board to receive and see if the nRF sends. Alternatively, you could use a switch to send random pulses and see if anything is received, and an LED to see if it flickers when sending.

crisp talon
#

@north stream awesome I'll check that tomorrow

quaint tendon
#

Hello - after waking from deep sleep, I am trying to get state of a topic called "pump" by publishing a value to fake topic "pump/get". I believe this should cause adafruit to send the last state of the topic and my callback should be invoked. Is this correct? (Confirming because my callback is not firing).

#

Disregard - I am indeed getting the callback. My code wasn't structured to await the callback.

fallow harbor
#

@north stream I found out that the second hole from the right is connected to PD1 on the IC for some reason.

#

And the second pin from the left (third pin from the right) is connected to NSRT.

#

And the pin marked + goes to VDD and VDDIO.

#

And the last pin from the right connects to VSSA.

north stream
#

You could, of course, reflash it with your own firmware, tack wires onto the serial pins, and make it into an intelligent peripheral that way, but that's looking like non-trivial effort.

fallow harbor
#

Ohh okay, well, I thank you for your help with this!! I guess I will take it from here and see what I can do with this module!

#

@north stream But do you think there are any other ways to feed the data to an Arduino?

north stream
#

You might be able to tap off the leads talking to the sensors themselves. The RTC is probably a DS1302 (SPI) or DS1307 (I2C) or equivalent. The temperature sensor is probably a thermistor, the humidity sensor is probably a DHT something, with its own protocol.

fallow harbor
#

Actually, I think I should do it with separate components since I have them.

#

Toss it all on a breadboard and probably hook it up to an OLED.

north stream
#

That would work.

plush field
#

Do Anyone knows how much mA can arduino pro micro(Chinese knock) provide?

wide lark
weary ember
#

Is there a better way to code this: if(x == y -2 || x == y - 1 || x == y || x == y + 1 || x == y + 2)

#

Oh lol discord formatting got me, you get the point though

#

or or or or

wide lark
#

@weary ember try using the code formatting?

#

(backticks)

weary ember
#

I don't follow..

wide lark
#

use the code formatting to show us your code

#

I can't read that

weary ember
#

Oh sorry

#

um lol what is a backtick?

wide lark
#

no apologies needed! just want to help if I can ๐Ÿ˜ƒ

weary ember
#

\

#

?

wide lark
#

the key next to the "1" and above the tab

weary ember
#

ah

wide lark
#

is also the tilde (~) key

weary ember
#

|| test ||

#

||

#

ooohh

#

okay here goes

#

if(x == y + 2 || x == y + 1 || x == y || x == y - 1 || x == y + 2)

#

hoping for a more elegant solution than or or or or

wide lark
#

if (x <= y + 2 && x >= y - 2) (this is assuming you actually meant x == y - 2 not x == y + 2 in the last clause of your example...)

#

you're looking to see if x is in the range of y-2 to y+2, so this way ^ is just clearer if anything

weary ember
#

Oh man, yep that is perfect, I feel foolish now lol. Thank you for your help!

wide lark
#

@weary ember you're welcome, no worries at all! and no need to feel foolish at all, we've all been there ๐Ÿ˜ƒ best of luck, have fun!

#

@weary ember and I know this is unnecessary and just super-dorky, but I'm a programming dork so I'm going for it anyway: interestingly enough, both of our solutions would work just fine as long as x is typed as an int, but yours might start breaking while mine would keep working if I changed x to be a double or float. C is "fun"! ๐Ÿ˜ƒ

weary ember
#

lol yeah I see how that works. I've read that float and presumably double produce a lot of lag so I'm staying away, not that I would need that level of precision for this project anyway

wide lark
#

yeah they aren't nearly as efficient in terms of compute cycles, that's for sure. and the way they work 2 may not be actually 2, but something like 2.000000000000000001

weary ember
#

This is my first real project and I have everything working, I'm just looking to shrink my code down and make it look nicer tbh

wide lark
#

which may implicitly cast to int and be truncated to 2, but may not

#

@weary ember very good call! that's a great move, taking the time to refactor your code to make it more elegant and readable is always worth it

#

even if it doesn't introduce any performance gains

north stream
#

Or if (abs(x-y) < 3)

runic vale
#

Hello all, got a quick (couple) questions about the Arduino IDE. - 1) Is it true I cannot view/edit the source/headers in c behind a project within the IDE? (It says only files ending in .ino or .pde - not .c .cpp .h etc), and, 2) if so, is there a next level up compiler/IDE that does expose the full stack of the project yet contains the arduino programming functionality?

crisp talon
#

@north stream Hi i'm back.

so I don't know if you remember my issue with the uart communication

so I cannot even upload the code onto the adafruit bluefruit nrf52: this error keeps popping up:

Sketch uses 18720 bytes (6%) of program storage space. Maximum is 290816 bytes.
Global variables use 2268 bytes (4%) of dynamic memory, leaving 48804 bytes for local variables. Maximum is 51072 bytes.
Upgrading target on COM22 with DFU package C:\Users\edwin\AppData\Local\Temp\arduino_build_964540\sender1.ino.zip. Flow control is disabled, Single bank, Touch disabled
Timed out waiting for acknowledgement from device.

Failed to upgrade target. Error is: No data received on serial port. Not able to proceed.
Traceback (most recent call last):
File "nordicsemi_main_.py", line 294, in serial
File "nordicsemi\dfu\dfu.py", line 235, in dfu_send_images
File "nordicsemi\dfu\dfu.py", line 200, in _dfu_send_image
File "nordicsemi\dfu\dfu_transport_serial.py", line 179, in send_start_dfu
File "nordicsemi\dfu\dfu_transport_serial.py", line 243, in send_packet
File "nordicsemi\dfu\dfu_transport_serial.py", line 282, in get_ack_nr
nordicsemi.exceptions.NordicSemiException: No data received on serial port. Not able to proceed.

Possible causes:

  • Selected Bootloader version does not match the one on Bluefruit device.
    Please upgrade the Bootloader or select correct version in Tools->Bootloader.
  • Baud rate must be 115200, Flow control must be off.
  • Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.
#

this is the code:

char mystr[6] = "Hello"; //String data

void setup() {
// Begin the Serial at 9600 Baud
Serial.begin(9600);
}

void loop() {
Serial.write(mystr,5); //Write the serial data
delay(1000);
}

north stream
#

@runic vale Yeah, you can edit .cpp and .h files in the Arduino IDE, I do this often.

crisp talon
#

it works perfectly with the arduino uno as the reciever but with the adafruit nrf52 it does not work

#

what editing should I do?

#

for the .cpp and .h files

north stream
#

Looks like you need to update the bootloader

pine bramble
#

@runic vale The source stack is on your machine.

runic vale
#

Right I have the source right here, I just can't seem to open it in the IDE

crisp talon
#

@north stream so I updated the bootloader but it did not change anything

#

it only works when the teensy 3.2 and the adafruit bluefruit nrf52 are not connected

runic vale
pine bramble
#

What are you trying to look at?

north stream
#

Alas, I'm not an expert on the nRF52 and that's all I had to offer. ๐Ÿ˜ฆ

crisp talon
#

who should I ask?

pine bramble
#

There's a preference setting you can change that allows you to edit any tab's content. By default you should have been using the internal editor; enabling an external editor is an option that's not setup by default (since they don't know what coding editor you prefer).

runic vale
#

I'd be fine using the default IDE if I could figure out how to read/edit the headers as well as the arduino pseudocode

#

I still think im just missing something lol

pine bramble
#

I haven't used it in a while; it's possible it won't let you edit an .h or .cpp directly in the foosiwiggi there.

#

I always use an external editor so this doesn't come up often.

runic vale
#

Right, so then use your own IDE and just bring back to the arduino app to build for the chip and flash it?

pine bramble
#

I use the IDE as a quick sanity check (to make sure I'm compiling what I think I'm compiling).

runic vale
#

is that the typical workflow then?

pine bramble
#

I use the IDE to compile, usually. Not always.

#

The IDE will reflect my external edits, as if I'd made them from inside the IDE.

#

I only use that for tracking the mainfile (foobar.ino).

#

(Which is an empty file!)

#

I think I took to flashing the target from the command line. I don't remember, but I do remember distinctly thinking 'this is faster than the IDE is'.

runic vale
#

ok, ill start working out a workflow with the limitations of the stock IDE in mind

#

thank you

pine bramble
#

Just remember that compiling Arduino is slow because you compile everything you don't need, every iteration.

north stream
#

I'll usually create a folder in the place the IDE stores files, put my .cpp, .h, and .ino files in there, then open that directory as a sketch.

pine bramble
#

You're welcome.

#

I forgot: I've been using a real Makefile for most uses, as I'm into 'bare metal' development.

#

That's the part that's much faster than Arduino is. ;)

crisp talon
#

@north stream this might be a stupid question but what are .cpp, .h, and .ino files?

north stream
#

The usual default file that Arduino create for sketches has a .ino extension (used to be .pde). However, you can add additional code to a project, usually C++ pieces that go in .cpp and .h files.

pine bramble
#

You're only allowed one directory, called ./src (it can have subdirectories).

north stream
crisp talon
#

where do I add the additional code? wait do I just use the add file?

and what is the additional code that I put?

north stream
#

You can use Sketch -> Add File to add files.

#

I'm not sure I understand your "and what is the additional code that I put?" question

runic vale
#

@north stream ohhhhh that rules! Now I get it, sketch>Add files works.

#

So strange that it rebuked the notion of just opening a file for editing as-is lol

pine bramble
#

Oh. ALWAYS end the IDE if you add or delete a file!

crisp talon
#

you said that I should "add additional code to a project, usually C++ piecies that go in .cpp and .h files"

i'm confused what code I should add as the .cpp and .h files

pine bramble
#

It makes a copy elsewhere, and compiles from the copy.

runic vale
#

good tip @pine bramble thanks for heads up

pine bramble
#

Yeah it makes a huge difference as it will compile as if you hadn't added that new file.

north stream
#

@crisp talon I was replying to @runic vale 's question at that point - having two conversations at once can be confusing

pine bramble
#

(or something similar; I don't remember exactly what it does, but it's counter-intuitive -- and ending the session (to start it from scratch) is the solution to that Arduino_ide-ism. ;)

crisp talon
#

@north stream OOOOH that makes a lot more sense sorry

pine bramble
#

haha.

#

The developers of Discord ignored some important prior work, so we have an uneven result in how Discord implements interleaved conversation.

north stream
#

Truth.

crisp talon
#

yeah

north stream
#

That's why I said "@runic vale Yeah, you can edit .cpp and .h files in the Arduino IDE, I do this often." in a hope of making it clearer to whom I was replying.

pine bramble
#

To be fair, they're also doing a new thing, which is using web browser based technology, so it's a whole different grandfather. ;)

#

That secure version of IRC, I thought, had everything right.

#

silc?

north stream
#

I missed that one, apparently. I used IRC back in the day, then moved on to AIM, Slack, and then Discord.

pine bramble
#

There was a well-known IRC client that was modified for use with Silc, I think. I am certain it used monospaced X11 fonts (such as the VGA font used in DOSEMU). In an xterm.

north stream
#

Heh, I've been using X11 fonts with DisplayIO with CircuitPython.

pine bramble
#

;)

#

I once lifted a Linux Virtual Console font for use in X11. My work ended up being the default VGA font in DOSEMU. I checked .. subtle things I'd done were intact, in the distributed version.
I'm pretty sure I know how it got in there. ;)

#

The path was an UUENCODE'd post I put in a message base, with that font file.

north stream
#

I found Sun Microsystems lifted the bootloader I wrote after they informed me it was impossible.

pine bramble
#

The guy who made use of it worked at SUSE.

#

Haha.

north stream
#

I didn't really mind, as it made installing SunOS much easier.

pine bramble
#

Yeah, you just got burned on the compensation, but you still got it 'published'. 1 out of 2 ain't bad.

#

Hey, nice to see you again. I got to get to bed. New SIM card coming tomorrow. o joi.

#

I've been off the air, insofar as WiFi is concerned, since the KRACK thing in Oct 2017; new phone has adequate patch against it)

north stream
#

Yeah, bed for me too. And likewise, nice to see you again.

crisp talon
#

okie same good night guys

pine bramble
#

๐Ÿ’ค

nimble terrace
#

Is there some glass with like controlable sunscreen / opacity ?

#

the idea is to build a greenhouse that can regulate the light emited outside, based on outside luminosity, (may be offtopic)

lyric wagon
#

@nimble terrace look at "smart tint" - not cheap though

nimble terrace
#

wow thx ! yeah must be expensive yet

lyric wagon
#

motorised blinds would probably be the easiest and cheapest option

nimble terrace
#

it is not a real project yet, but an old idea

#

and yeah something mechanical would be more viable

lyric wagon
#

the blinds with the rod that you rotate

#

that would be easily coupled to a motor

nimble terrace
#

lightning as a great boost in new products and possibilities with high power led

plush field
#

Is there any way I can read state of switch which is powered from different power source?

#

It's switch with one input and two outputs one is on and other is off at default state.
I wanted to push 5v from external source into switch and pass default state into led which will be connected to this external supply ground.

#

Should I think about shorting grounds to achieve it?

north stream
#

There are a few possible approaches. One is to connect the external supply ground to your Arduino ground, and the other contact on the switch to an Arduino input, and connect a pulldown resistor to ground.

#

Another approach would be to use the remaining contacts as an ordinary Arduino switch, but if the external supply and the Arduino supply was not floating, it could cause a short circuit. Additionally, you could use an opto-isolator to sense what the switch is doing while maintaining complete electrical isolation.

proven bloom
#

hi i need help i want to change to diffrent animations with multple buttons can some one tell me how to do this or be genours enough to send me a sample code where i can paste my animations in please

north stream
#

What kind of animations? On a screen? On a LED strip? On an LED matrix? Something else like servos?

proven bloom
#

on a ws2812b led strip

north stream
#

How are your buttons hooked up?

proven bloom
#

gnd to d1 / gnd to d2/ gnd to d3.... ETC

#

any thought anyone

north stream
#

Configure your button pins with INPUT_PULLUP

#

Then in loop(), have statements like ```c
if (digitalRead(0) == LOW) {
doAnimation1();
return;
}

if (digitalRead(1) == LOW) {
doAnimation2();
return;
}

proven bloom
#

im not going to lie im not the best at this ive been learning for sample codes and youtube this is just a little crazy project for my sons ride-on car how much would you charge write the code and send it me im not going to pay anthing crazy but maybe if you have a little free time when your not busy

#

#include <Adafruit_NeoPixel.h>
#ifdef AVR
#include <avr/power.h>
#endif

#define PIN 3

Adafruit_NeoPixel strip = Adafruit_NeoPixel(32, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
strip.begin();
strip.show();
}

void loop() {
lightAlt();
}

void lightAlt(){
uint32_t r = strip.Color(255, 0, 0);
uint32_t b = strip.Color(0, 0, 255);
uint32_t o = strip.Color(0, 0, 0);
uint32_t w = strip.Color(0, 0, 0);
for (int i=0; i<10; i++)
{
strip.setPixelColor

strip.show();
delay(200);
#

thats how ive been doing it so far SORRY if im not aloud to do that in chat anyone

#

but that is without any buttons

north stream
#

Hmm, I'm at work right now. Looks like you have the beginnings of something but will need it fleshed out.

proven bloom
#

yep that sounds about right and okay would you be able to come up with something for me when your not busy and then drop me a message?

north stream
#

I don't know, my life is pretty random. Perhaps someone else here will pipe up.

proven bloom
#

okay no problem thank you for your help only person that has said anything have a good day!!!

bleak glacier
#

@proven bloom Not sure what board you are using but here is some stuff that will help you get started with neopixels and such... There is the Neopixel Uberguide https://learn.adafruit.com/adafruit-neopixel-uberguide/the-magic-of-neopixels for all things neopixel-ly. After you get the strip properly wired up to the board, the STRANDTEST sketch found in the Arduino IDE examples dropdown menu - loaded with the neopixel library - has a bunch of demo animations to test out the lights. This set of guides - https://learn.adafruit.com/multi-tasking-the-arduino-part-1/overview https://learn.adafruit.com/multi-tasking-the-arduino-part-2/overview https://learn.adafruit.com/multi-tasking-the-arduino-part-3?view=all I believe there is an example sketch for using buttons to switch light animations in there. It also explains the workaround to the issues of neopixel hardware in arduino. Once you get going, browse through the Learn section on the Adafruit site to get more ideas or see similar projects to what you want to do. There will be good tutorials and sample code there to work with. Good luck.

Everything you always wanted to know about Adafruit NeoPixels but were afraid to ask

Make your Arduino walk and chew gum at the same time.

Excuse me while I interrupt myself...

Unleashing the power of the NeoPixel!

#

Oh, to block out code in this discord, put three tick marks ` the key left of the 1 or ! key, before and after your code. It makes it more readable by highlighting it as code. That strip.SetPixelColor command you have is missing the parameters.

proven mauve
#

Hey, I picked up some barebones atmega328p's off banggood that already have boot loaders. I've popped the chip out of my Uno and have flashed one of these new ones with a blink sketch and it took it just fine. However, I need to flash a new 8mhz bootloader to one so that I can power it with a couple AA's and I can't get the bootloader to flash, avrdude gives me a can't sync/communicate with programmer error. I downloaded a barebones folder to go into my hardware folder and have attempted to flash with Arduino as ISP with the chip in the socket, and also breadboarded, but I can't seem to get it to take.

#

I'm using the files and instructions from this instructable: https://www.instructables.com/id/Configure-Arduino-IDE-for-Atmega-328P-to-Use-8MHz-/

Instructables

Configure Arduino IDE for Atmega 328P to Use 8MHz Internal Clock: If you are making Arduino on breadboard using Atmel Atmega 328P then traditionally you need a 16MHz crystal and a couple of capacitors. But in some cases, we don't have crystal or capacitors.To solve this probl...

gleaming edge
#

anyone know a good way I can step down a 24V, 80A automotive battery to 12V, 2A?

proven mauve
#

out of curiosity what kind of vehicle uses an 80V battery?

#

this is the console when I try to burn the bootloader. Currently I have it wired to a breadboard and the blink sketch runs just fine, it also gets the reset signals from the computer before it tries to burn each time.

gleaming edge
#

it's a truck

#

not sure which, a mate told me

#

oh sorry I screwed up lol

#

it's 24V, 80A

proven mauve
#

oiy, apparently I can't upload a sketch at all currently. I'll have to try again tomorrow

gleaming edge
#

would a buck module suffice

proven mauve
#

as long as it fits within those voltage guidleines and your power draw isn't too great through it I would check into buck converters.... but I'm pretty novice so please take that with a grain of salt.

gleaming edge
#

Yeah... 80A is a lot

proven mauve
#

their warnings seem to be focussed on what you're plugging into the converter and that it's not drawing more than 6 amps

#

model c72 = 72 watts = 12v at 6amps

#

I think all alternators run high current like that 80a available... I think better ones go up to around 120 if I remember right

#

I think your biggest worry is just the current draw of the electronics you're trying to power

#

gl!

gleaming edge
#

Yeah that isn't much.. just 2A

lyric wagon
#

@gleaming edge the 24V DC will be 2x 12V batteries in series. You could just tap off one battery

proven bloom
#

does anyone have time to write abit of code for my sons ride-on vechile please

nova ether
#

I'm playing with some Lora Feathers and looking for a way to uniquely identify the different nodes. I've not been able to find a way to extract any type of hardware ID. The radiohead library specifies the address as an uint8_t, so that is a bit small for just randomly selecting one for uniqueness purposes. Any suggestions on how to pull some hardware info from a feather 32u4?

#

You can find cheap modules on eBay that do the same, but I've had them melt as much lower loads then they are specced for. The Murata stuff is very high quality

velvet pike
#

Hey does anyone know the best way to turn a relay on (digital pin high) for a set amount of time/frequency?

#

I'm essentially trying to control a water pump and lights for a hydroponics system, and I have an RTC module

#

at the moment I'm literally on an If statement

#
     digitalWrite(lightRelay, LOW);
     Serial.print("Day Time!");```
#

but that only gives me either minute by minute control or hour by hour, and I have to repeat that over if I want multiple cycles

gleaming edge
#

@nova ether thats perfect, thanks!

north stream
#

@velvet pike I'd probably set up a structure with the desired turn-on and turn-off times, then have a loop check (say) every second if it's time to turn on/off, and do so.

velvet pike
#

@north stream what's the best way of doing that? ๐Ÿ˜‚

north stream
#
if ((now.hour() == tp->hour) && (now.minute() == tp-minute) && (now.second() == tp->second))```
green ravine
#

I have an Arduino and a board which exposes the pins of a usb cable. Is there any way I can set up an HID by connecting the two data cables to the arduino's digital ports?

#

I really feel like this would be possible, but I'm not sure where to start in order to wrap an HID around a different component. I also know that a joystick will be connected to this port so I can predict what the inputs might generally look like coming from the HID.

north stream
#

There are some projects out there that implement USB by bit-banging IO pins, but that trick only approximately works, and more recent computers are less tolerant of USB protocol violations.

native kelp
#

wait I can use the arduino pro micro to act as a HID device on a computer, right?

north stream
#

Yeah, it has a 32U4 chip, which has built-in USB support.

nimble terrace
#

Hey, I need some pcb/soldering/wiring tips, is that the right place ?

north stream
#

Looks like you're using stacking headers, so those pins you have wired from the top you could wire from the bottom more neatly (unless you wanted to keep the flexibility of wires plugged into receptacles).

nimble terrace
#

yes this is my first project, atm I still need wiring flexibility

north stream
#

I'm not sure how else you could improve it, as I don't know what you're doing or what you'd like to improve.

nimble terrace
#

Goals are

  • having flexibility to change gpio
  • plug wires for sensors (i2c, dht, more later on) and a 4x relay board
  • ability to add wemos d1 shields
  • reverse polarity protection for connectors
  • put all external and power wires on same side
#

maybe this is too much ๐Ÿ˜ƒ

#

On next version I will use male headers for the wires connextion on the PCB
that I'd connect on dupont socket

north stream
#

Sounds like you've already done some good thinking on this.

nimble terrace
#

yeah, but I still struggle with choosing and soldering the right connectors and cables

wraith current
#

When using two devices on the SPI bus I just need to manually enable and disable the devices via their respective CS pins right ?

north stream
#

Right.

wraith current
#

cool thanks.

inland crag
#

what's the default spi speed in arduino for samd51?

#

found my answer, nevermind

inland crag
inland crag
#

also that should be a feather name

royal lion
#

This is driving me insane right now, I'm trying to get both a SSD1306 OLED and a Maxim I2C heart rate sensor to work on the same Arduino Nano, but I can't use the same I2C pins because they seem to have the same address (I haven't tested this yet but I'm pretty sure it's true since only one device works at the same time)

#

So I thought I'd try software I2C. Neither the Adafruit SSD1306 library nor the Sparkfun library for the Maxim sensor support software I2C, so I tried to use SoftWire, a library which acts identical to Wire but it lets you use software I2C. However, the OLED (the device I want to have on the software I2C pins) won't work with SoftWire, and I think it's because it is expecting a Wire object instead of a SoftWire object

#
#define SCL_PIN 1
#define SCL_PORT PORTC
#define SDA_PIN 0
#define SDA_PORT PORTC
#include <SoftWire.h>
SoftWire Wire2 = SoftWire();
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire2, OLED_RESET);
#

I just now tried to replace &Wire2 with &SoftWire, but it still gives errors

#
error: expected primary-expression before ',' token
 Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &SoftWire, OLED_RESET);
                                                                ^
exit status 1
expected primary-expression before ',' token
#

The arrow is pointing to the comma after &SoftWire

#

Any idea how I can make this work? I am stuck and have no more ideas