#help-with-arduino
1 messages ยท Page 29 of 1
I like to start with a project similar (and usually simpler!) to what I'm thinking about, by searching the Adafruit Learning System. Here's a motion sensor camera project built on Raspberry Pi: @pine bramble
https://learn.adafruit.com/cloud-cam-connected-raspberry-pi-security-camera
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
Yeah, I do that a lot.
Some signals don't like the extra length, but usually it's not a problem.
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
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).
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
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.
An ordinary alkaline AA cell is good for about 1500mAh, but that varies with the discharge rate and duty cycle.
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
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.
maybe i can make long and light cord to avoid this all 
A somewhat sobering and inevitable part of engineering is the art of compromise.
As servo motor is an Analog component, so why we can use digital non-PWM pins with it?!
Any way to control Arduino from a website I make without having to plug into router via eithernet
wifi
bluetooth
radio
there are a ton of ways
but some are just more involved than others
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?
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?
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
they have an example transistor circuit here https://electronics.stackexchange.com/questions/30737/transistors-and-pwm
and some a more detailed arduino specific page here https://www.baldengineer.com/pwm-3-pin-pc-fan-arduino.html @patent vale
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
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
usb's power lines are designed for that to some extent
I am using a 220 ohm resistor , a transistor and a diode rectifier
though you are supposed to tell the usb host how much power you are going to pull
yeah go for it ill peek
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
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?
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
tbh thats a good design to kill a usb port
but your circuit here seems ok
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
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
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
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
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
the fan still sees current flow and a voltage difference so it should work
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
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
ok
then the transistor is a gate from the bottom of the diode/fan to ground
with the arduino turning the gate on and off
ok ok i get it now
the diode helps eat your emf from the inductive load so it doesnt kill your transistor
anyway, my issue is the code, I just wanted a simple on and off and not pwm speed control which is this based on
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
this circuit I am making, at least from where I am following it , is for a 12v fan
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
well Im gonna finish the code and test this to make sure
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
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
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
I am kind of regretting not going over what I learned on my circuits class a year ago
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
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 ?
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
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
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
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.
@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
most specifically, this is an example of sending JSON data via Redis using that pattern: https://github.com/electric-sheep-co/arduino-redis/blob/master/examples/JsonPub/JsonPub.ino
Iยดm interessted in your code
here's the Arduino Redis library I maintain (that that example is part of): https://github.com/electric-sheep-co/arduino-redis
the RPi data platform: https://github.com/electric-sheep-co/rpi
and a guide to building a particulate matter sensor with RPis using the aforementioned platform: https://www.hackster.io/rpj/atmospheric-particulate-matter-environmental-sensing-fb31a1
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!
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.
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
@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
I have a wemos
๐ 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
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.
@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 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
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
@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
Here's a writeup I found on how some of the cheaper soil moisture sensors "work" (the circuitry is fairly wonky): http://www.caffeineowl.com/electronics/rants/dfrobot-capacitive-probe/index.html
There is also this style which is even simpler https://www.sparkfun.com/products/13322
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/
Have you had any experience with this one? https://www.adafruit.com/product/4026 I have one but have not tried it out yet.
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.
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?
Or possibly a USB Bluetooth adapter (and a shield or serial one for Arduino).
Hey, Andreas made a nice video on sensors : https://www.youtube.com/watch?v=udmJyncDvw0
Unfortunately, most soil moisture sensors used in our Arduino, ESP8266, or ESP32 projects destroy themselves after a short while. We need a better solution. ...
he recommends this model http://bit.ly/2t4xd1Q that no external metal so resists to corrosion
Online Shopping at Banggood.com๏ผ
I ordered it a week ago.... still not shipped
https://www.adafruit.com/product/4026 we have one with i2c ๐ works great
temperature too
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 ?
it has nice design
๐ป
and temp is important for roots too ๐
How you already have the product I was speaking about : https://www.adafruit.com/product/1965
I may get both
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
Can i publish data in "void setup"?
I need to publish a data when plug in.
publish ? yes you can do what you want in setup
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
Hmm, the PN532 only has one I2C address, so they'd conflict unless you went to SPI or UART, or used an I2C multiplexor.
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
It shouldn't draw much if there's no input, maybe 2-3mA?
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.)
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
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.
hmmm
thanks
Would that generate delay?
I need it to comunicate faster than 10ms
Should be doable, but you might need to craft a simple protocol to identify "this is the beginning of data".
what if, just before sending the data, I just HIGH one pin? ๐ค
So this way the other arduino knows when to listen
Yeah, you could use one pin for "I'm going to send a block" and another pin for the actual communication.
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
Multimeter? LED? Two pins of what?
I believe it is 3.3v from my Geiger Counter, but the code on my Arduino, doesn't seem to be reading the pulses
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
I am using the Hazzah ESP8266, but just not having luck getting a count
might also need to mess with pull ups etc
or it might be analog and need an amp
whats the geiger counter model
maybe your depleted uranium is too depleted?
haha
LOL, no just counting background noise
can you paste your sketch to pastebin ?
As you can see there is a 3 pin next to a 2 pin opposite the power edge
here is the schematic for the pictured board https://github.com/SensorsIot/Geiger-Counter-RadiationD-v1.1-CAJOE-/blob/master/Geiger Counter Diagram.pdf
- interrupt the output interface, through this interface can be connected to the
microcontroller and then displayed on the LCD.
supposedly at least
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
oh yeah digital read will 100% miss them
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
do you get a noise or led output?
I can here it pulsing, I just can't capture the count
the schematic and that instructable indicate you should
icic
what does your code look like?
yeah, he's using interrupts on that sketch
I have used both the sketchs in step 5 and step 6
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
the middle pin says 5v
the 3 pin header is vcc [5v?] signal then ground according to the schematic
but it's not triggering a sketch you've used that relies on interrupts
the signal, i think is the one used to feed the beep and led
so, i would assume that the voltages on the geigers output are too low for the arduino to trigger
but I know the pin 2 that I pug into is 3 not 5
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
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
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
I also believe its a pull down and not up
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
so not sure if that makes a different in the code
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
one is power on and the other is a visual que that occurs when I hear a pluse
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
to power the device I use the external power through USB, the Hazzah is also powered USB
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
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
what is int here? a pin on your micro?
next one after 4 and 5 which I believe is i2c
no its a pin on the arduino
i mean the counter
ah is it part of the 3 pin connector?
on the opposite end of the counter the 3 pins are marked gnd|5v|int
yea
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
and the other going to ground
yeah +pow to 5v or whatever from usb and -pow to ground
and that ground is shared between the counter and arduino
on the hazzah 2 is also connected to the blue light
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
reading https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/pinouts i think gpio 13 might work
it doesnt seem to have anything special
and no pull up by default was mentioned here on this page
ah yours might be a bit different lets see
reading up on that board at https://learn.adafruit.com/adafruit-feather-huzzah-esp8266/pinouts pin 2 has a pull up on it, and 13 is an spi pin.
to be super safe you could try gpio 5
i didnt see anyh notes about it
gpio 4 and 5 seem to just be regular gpio
i went for food
just had a look at the schematic
you've probably already asked.. but
the gnd on P2
the arduino sketch doesnt seem to enable one
is it also connected to the gnd on your arduino?
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
When I showed you our Atomic Shelter in video #151, I thought, the cold war is over and these shelters are a thing of the past. Just a few days later I had t...
7:39
the pin labelled VIN is, apparently, the ouput
yeah very strange but i agree
I spoke with Andreas, be he was not sure about the Hazzah
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
ok, i will try that
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
yea it has high voltage
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
thank you for your time
so i think the one built into pin 2 of your board for the led is likely messing stuff up
yw
have a good night
how to connect multiple nodemcus to the adfruit sever using mqtt liberary code
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
I think Arduino stores booleans as bytes, and the Available() call gives the count of bytes available, so yes, I'd expect 5.
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.
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.
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
What is .c? And .raw is a camera raw, right?
to be honest, i don't know, .c image files look like this
i have both a .raw and a .c file
don't know which one to use
well no kidding that's too large
That's a 42 kilobyte array
an Arduino does not have that much RAM
402 kB
oh, sheesh
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
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
There are SD libraries built in to Arduino
i feel stupid
i just noticed that i try to use a .c/.raw file with a function called drawbitmap
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
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
The HTFT::drawBitmap() call takes a pointer to a bitmap, not a File object.
@river venture I finally got it to work on pin 12 I ended up just trying every pin
nice nice
i'm not sure i get what you mean, that mean it can't draw bitmap ?
because on the manual, it's the function to draw the 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
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.
@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)
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
@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
hey thx
yw! ๐
your differences looks almost linear
yup they are, good eye
and not very big
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)
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 ?
as long as it's not fully covering the diffusion cover (the open grid thing) you should be ok
@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.
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
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.
What kind of Metro ?
I have read half of https://www.amazon.fr/Programming-Arduino-Getting-Started-Sketches/dp/0071784225
I gives very nice and simple explanation, even if your are totaly new to coding, I had the feeling that all basics are well explained (Im not btw)
Can 2 meters of wire impact DHT or I2C readings ?
having a dht22, a photocell, an I2C bme180, 2 meters away from my ESP, can I share signal wires ?
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
Ok thx
you might have better luck with ethernet cable
but 2 metres is probably close to the limits of i2c
ethernet will be cheaper than electronic cable at my local shop for sure ๐
just dont go sending 2A @ 60V down it ๐
i'm not sure what it's rated to, to be honest..
how you know Im buidling a heater ?
It works bme280 on 2 meters of 20 awg
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?
@vagrant merlin have installed all the board support packages? can you get the basic blink example to upload and run?
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
where did the joystick library come from?
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
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
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
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
you could look at how arp works and maybe do something like that
I saw UART could do the job ?
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
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 ?
You could have an extra serial line for master communications, sure
I want Master device to be able to be connected on any of thoose slave port
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
Introduction It is possible to chain Arduinos together in such a way as to get communication between the two. Having Arduino-Arduino communication can be useful for many projects, such as having one Arduino to run motors and having another sense the surroundings and then rela...
this might help you get on the right track
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
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
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
Order today, ships today. RVXR-280-SB-073105 โ Ultraviolet (UV) Emitter 280nm 7V 100mA Star Array from RayVio Corporation. Pricing and Availability on millions of electronic components from Digi-Key Electronics.
With arduino ?
ye
Uh
hopefully a feather
ye want to use some other sensors along side it
that is an option. would i be able to power it with a battery if i used a relay?
Relay is like a switch
So if your battery acheive the requirement of your LED yes of course
gotcha gotcha
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.
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
Yeah, 27ฮฉ should give you about 74mA, which is a reasonable amount of current for that LED.
thanks
hi is this for help with the M0?
Hi is this the right room for help with the M0 boot loader?
What's up with your M0, @arctic shore ?
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.
@burnt sluice that's because the time source here is the GPS chipset itself, which is using 1PPS timing: see section 1.5 of this datasheet: https://cdn-shop.adafruit.com/datasheets/GlobalTop-FGPMMOPA6C-Datasheet-V0A-Preliminary.pdf
or, to quote a uBlox app note on GPS timing: "The base of all timing and frequency applications is the one pulse per second (1PPS) time pulse, which is synchronized to GPS time or UTC." (source: https://www.u-blox.com/sites/default/files/products/documents/Timing_AppNote_(GPS.G6-X-11007).pdf)
And see the PPS and FIX pins in the pinouts section of the Ultimate GPS product guide:
https://learn.adafruit.com/adafruit-ultimate-gps/pinouts#other-pins-2-8
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.
Maybe use INPUT_PULLUP instead of plain INPUT?
ahhhh ok will try
Thanks!
@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);)
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.
Your baudrate's fine.
I do the same thing. Once the computer is off it stays off.
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
@mystic gate What's your Serial Monitor show? I'd imagine it's trying to connect and not connecting.
@north kelp it conects normally, the problem is that is calling the loop function very slowly
Also, in MQTT_connect() there's a delay(5000).
also what is while ((ret = mqtt.connect()) != 0) { supposed to be?
that assigns ret to mqtt.connect and doing that successfully returns true
yeap
@mystic gate I'd try commenting out all the MQTT. I think you'd find your loop() runs 1000s of time a second.
ok will try
I know that doesn't solve your issue, but it should focus on what's slowing things down.
the MQTT_connect function just returns when the conextion of mqtt is successful
Are you watching your Serial Monitor? Do you see messages like "Retrying MQTT connection in 5 seconds..."?
i didn't make the code, it works so far but i think i need to optimize it
no the seria monitor is fine,
Whoever did write this totally needs to comment it before giving it someone else
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! ๐
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.
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!
Check your Adafruit.io credentials. I'd add more code to confirm that connectivity, authentication and logging is happening.
well you two are right, and i will.
I'd at least add this comment:
if (retries == 0) {
// Ghost the user, and give no clue what went wrong.
while (1);
}
๐
haha yeah you're right
here i found that code xD
https://www.viralsciencecreativity.com/tutorials/google-assistant-home-automation-iot-nodemcu-esp8266
Better is:
if (retries == 0) {
Serial.println("Gave up trying to connect to MQTT.");
while (1);
}
i think that code is just depresed ๐ฆ
Cheers, @mystic gate ! Let us know of your progress.
thanks! ๐ will show you mah project soon
Bench of DHT11(slim) DHT22(fat) BME280(fat+dark) Temp + Humidity
Current conclusion DHT22 Hum is way to high, need more data
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 ๐
Do you want push or pull?
Digikey offers some by Delta Electronics like this one https://www.digikey.com/product-detail/en/delta-electronics/DSML-0224-05/1144-1320-ND/5214011
Order today, ships today. DSML-0224-05 โ Pulse Duty Solenoid Open Frame (Pull) Type 0.200" (5.08mm) Stroke 5VDC Chassis Mount from Delta Electronics. Pricing and Availability on millions of electronic components from Digi-Key Electronics.
@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 .. )
The usual way to do that is a circuit known as an "H-bridge".
all right, I used that whle driving a motor, so it should be ok ;p
-> big thanks :)))
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.
It's sneaky: intArr is of type int *
Arrays of arrays are not commonly used in C, though it does work as a way to specify a multidimensional array...
Multi-dimensional Arrays in C - Learn C programming in simple and easy steps starting from basic to advanced concepts with examples including C Overview, language basics, Environment Setup, Program Structure, Basic Syntax, literals, data types, Variables, Constants, Storage C...
You could do it with ```c
int * intArrArr[] = { intArr };
Oh, also, the order of dimensionality matters.
I bet changing ```int intArrArr[][1] = {intArr};
to int intArrArr[1][] = {intArr};
would work as you expect
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[][].
It's a type mismatch: int[] isn't an integer.
Yeah, I'm not great at data types, but a C array is a pointer to a linked list IIRC
I know.
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).
int * int[1] works for what I want so I'll go with that.
A C array is a pointer, but not to a linked list, just an area of memory with values arranged consecutively.
Sorry I meant an element of the outer array part. A row so to speak.
Alternatively, you could just initialize the whole thing at once: ```c
static int intArrArr[][3] = {
{1, 2, 3},
{4, 5, 6}
};
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.
Comparing BME280 and DHT22
DHT is late, DHT Hum is 15% higher
Testing with 2 sensors only does not mean much :/
Do you know some public weather API ? this could help for calibration
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.
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 ):
@little nimbus What are you making? Which API is giving you problems?
openweathermap
every tutorial says to use arduino http client library but i think it's whats giving me errors
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
@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 you're very welcome! best of luck
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'
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.
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
@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!
i will now lol!
๐ ๐
found some good code on State Machine out there https://forum.arduino.cc/index.php?topic=505806.0
New State machine tutorial
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 =/
https://www.adafruit.com/product/2298 Looks like this one.
You're welcome ๐
would anyone care to help me configure my NFC shield with arduino uno v3?
๐
i live in australia, this is the nfc shield i found at our electronics shop : http://learn.linksprite.com/arduino/run-nfc-pn-532-shield-on-arduino/
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"
@tropic plume Looks like others have had this problem as well with LinkSprite's NFC shield.
http://forum.linksprite.com/topic/4081-nfc-shield/
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
I think your Serial Monitor needs to be at a different baud rate. Probably 115,200.
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 ๐
Sweeet!
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.
No worries!
so now, step one done
Take it a step at a time. I like to focus on the magic first.
yeah. i had a crack yesterday at making a small audio amplifier with an lm386
went quite well. super fun toying around with it
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
Adafruit Industries, Unique & fun DIY electronics and kits : Hacker Spaces/Distributors Map - Tools Gift Certificates Arduino Cables Sensors LEDs Books Breakout Boards Power EL Wire/Tape/Panel Components & Parts LCDs & Displays Wearables Prototyping Raspberry Pi Wireless Youn...
ah, sadly canberra is the closest.. about a 2 hours drive away
I'm in the San Francisco area. I lived in Melbourne and Sydney for almost 6 months a few years back.
Well, at least shipping would be closer, faster, and likely cheaper.
yes. i will probably do that if i face any more troubles with this outdated thing. i was just too impatient to get going ๐
Melbourne:Sydney :: San Francisco:Los Angeles
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++ ?
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. ๐
aha this is the right place to link up like that.
I've been doing Arduino for a few years.
i really want to got some maker groups in syd
Did you have an Arduino/C++ question in mind?
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 ๐
Wow. Good job. My coworkers use SolidWorks.
the coding aspect of my project is very simple
BTW, I'm also on https://forums.adafruit.com frequently answering more involved questions.
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
Have you looked at MakeCode at all?
never heard
looking at it now
is that just basically what i described?
a tool which can translate plain english to half efficient code?
In this week's MakeCode Minute: External NeoPixel Strip Graph @adafruit @johnedgarpark #adafruit @MSMakeCode. How to graph a light level on the photo sensor ...
Not quite, but likely easier than C++.
mate this looks perfect for now
It requires a more powerful microcontroller than the classic UNO. The Circuit Playground Express is the best platform for it right now.
Circuit Playground Express is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! ...
is it quite extensive in the sense it can identify and handle all the different sensors that arduino has?
The CPX has a number of built-in sensors. But you can also attach external sensors, just as on an Arduino.
cool, like a nfc reader? ๐
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.
what im doing right now is just trying to get a working, albeit primitive, prototype to take to my patent lawyer
That's a good step. I applaud the primitive part.
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 ๐
enjoy, thanks for the info
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?
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
Which one do you have ?
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.
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?
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!
When you say print to serial, do you mean an actual serial port, or a USB emulated one?
the actual built in arduino serial
do you have a Serial.begin ?
nice function, i will reuse it, I need a weather API too
yeah i do
the serial displays the wifi connection
but it doesn't display anything else
and thank you, except it doesnt work lol
yet, but it will
i hope so it's very frustrating
debuging on arduino is not easy, but this is part of the game
aha
Starting connection to server...
connected to server
closed connection
{"cod":401, "message": "Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."}
i think an issue was closing the connection, i've deleted that and now it's displaying the data
got it to almost work on esp32
what did you change?
i think you just need the OWM key
which you get by signing up
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 !
thanks for helping!
i tried that code, but my seiral just prints
Starting connection to server...
connected to server
closed connection
got it all working thanks to everybody!!!! x
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
I'd test if the nRF can receive and transmit individually.
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?
This is the module: http://www.icstation.com/m219-clock-temperature-humidity-sensor-module-lcd1602-display-module-p-13100.html
XH-M219 Clock Temperature Humidity Sensor. XH-M219 Clock Temperature Humidity Sensor LCD1602 Module. LCD1602 Display Module.
I circled the port here.
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).
I will have a closer look when I get home.
It says the main MCU is the STM8S105K IC.
Just went onto the IC's datasheet and I think I found the right version's pinout.
Ah, should be able to buzz out which pins UART2_RX and UART2_TX go to on that connector.
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.
@north stream how would i test if it can receive and transmit individually?
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.
@north stream awesome I'll check that tomorrow
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.
@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.
Ah, reset and the SWIM (Single Wire Interface Module) pin: probably used for flashing the firmware instead of a serial debug port. You should be able to trace code, set breakpoints, etc. with it, but without source code it might be tricky to make much headway with the original firmware. https://www.st.com/content/ccc/resource/technical/document/user_manual/ca/89/41/4e/72/31/49/f4/CD00173911.pdf/files/CD00173911.pdf/jcr:content/translations/en.CD00173911.pdf
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.
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?
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.
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.
That would work.
Do Anyone knows how much mA can arduino pro micro(Chinese knock) provide?
Neat! https://www.kickstarter.com/projects/1186620431/uchip-arduino-zero-compatible-in-a-narrow-dip-16-p
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
I don't follow..
no apologies needed! just want to help if I can ๐
the key next to the "1" and above the tab
ah
is also the tilde (~) key
|| 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
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
Oh man, yep that is perfect, I feel foolish now lol. Thank you for your help!
@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"! ๐
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
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
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
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
Or if (abs(x-y) < 3)
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?
@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);
}
@runic vale Yeah, you can edit .cpp and .h files in the Arduino IDE, I do this often.
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
@runic vale The source stack is on your machine.
Right I have the source right here, I just can't seem to open it in the IDE
@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
I get no love clicking on the headers atop the Arduino code, and greyed-out filenames when I attempt to open via the open file dialog, and when I drag them in I get this:
What are you trying to look at?
Alas, I'm not an expert on the nRF52 and that's all I had to offer. ๐ฆ
who should I ask?
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).
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
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.
Right, so then use your own IDE and just bring back to the arduino app to build for the chip and flash it?
I use the IDE as a quick sanity check (to make sure I'm compiling what I think I'm compiling).
is that the typical workflow then?
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'.
ok, ill start working out a workflow with the limitations of the stock IDE in mind
thank you
Just remember that compiling Arduino is slow because you compile everything you don't need, every iteration.
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.
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. ;)
@north stream this might be a stupid question but what are .cpp, .h, and .ino files?
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.
You're only allowed one directory, called ./src (it can have subdirectories).
Folder with files in it, and the resulting display in Arduino
where do I add the additional code? wait do I just use the add file?
and what is the additional code that I put?
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
@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
Oh. ALWAYS end the IDE if you add or delete a file!
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
It makes a copy elsewhere, and compiles from the copy.
good tip @pine bramble thanks for heads up
Yeah it makes a huge difference as it will compile as if you hadn't added that new file.
@crisp talon I was replying to @runic vale 's question at that point - having two conversations at once can be confusing
(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. ;)
@north stream OOOOH that makes a lot more sense sorry
haha.
The developers of Discord ignored some important prior work, so we have an uneven result in how Discord implements interleaved conversation.
Truth.
yeah
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.
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?
I missed that one, apparently. I used IRC back in the day, then moved on to AIM, Slack, and then Discord.
SILC - Secure Internet Live Conferencing, modern secure conferencing and chat protocol
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.
Heh, I've been using X11 fonts with DisplayIO with CircuitPython.
;)
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.
I found Sun Microsystems lifted the bootloader I wrote after they informed me it was impossible.
I didn't really mind, as it made installing SunOS much easier.
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)
Yeah, bed for me too. And likewise, nice to see you again.
okie same good night guys
๐ค
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)
@nimble terrace look at "smart tint" - not cheap though
wow thx ! yeah must be expensive yet
motorised blinds would probably be the easiest and cheapest option
it is not a real project yet, but an old idea
and yeah something mechanical would be more viable
lightning as a great boost in new products and possibilities with high power led
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?
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.
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
What kind of animations? On a screen? On a LED strip? On an LED matrix? Something else like servos?
on a ws2812b led strip
How are your buttons hooked up?
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;
}
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
Hmm, I'm at work right now. Looks like you have the beginnings of something but will need it fleshed out.
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?
I don't know, my life is pretty random. Perhaps someone else here will pipe up.
okay no problem thank you for your help only person that has said anything have a good day!!!
@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.
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.
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-/
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...
anyone know a good way I can step down a 24V, 80A automotive battery to 12V, 2A?
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.
it's a truck
not sure which, a mate told me
oh sorry I screwed up lol
it's 24V, 80A
oiy, apparently I can't upload a sketch at all currently. I'll have to try again tomorrow
would a buck module suffice
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.
Yeah... 80A is a lot
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!
Yeah that isn't much.. just 2A
@gleaming edge the 24V DC will be 2x 12V batteries in series. You could just tap off one battery
does anyone have time to write abit of code for my sons ride-on vechile please
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?
@gleaming edge, assuming you need to supply 2A @ 12V (sourced from a 24V source): https://power.murata.com/products/dc-dc-converters.html
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
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
@nova ether thats perfect, thanks!
@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.
@north stream what's the best way of doing that? ๐
if ((now.hour() == tp->hour) && (now.minute() == tp-minute) && (now.second() == tp->second))```
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.
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.
wait I can use the arduino pro micro to act as a HID device on a computer, right?
Yeah, it has a 32U4 chip, which has built-in USB support.
Hey, I need some pcb/soldering/wiring tips, is that the right place ?
https://cdn.discordapp.com/attachments/384715064575262721/555409994728865792/20190313_162018.jpg how can I improve that ?
Yeah, here or perhaps #help-with-projects
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).
yes this is my first project, atm I still need wiring flexibility
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.
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
Sounds like you've already done some good thinking on this.
yeah, but I still struggle with choosing and soldering the right connectors and cables
When using two devices on the SPI bus I just need to manually enable and disable the devices via their respective CS pins right ?
Right.
cool thanks.
this reminded me of Zero Wing https://github.com/adafruit/Adafruit-ST7735-Library/blob/72e3f29f45063642eac1d7458d626102c7d6d188/Adafruit_ST7735.cpp#L196
This is a library for the Adafruit 1.8" SPI display http://www.adafruit.com/products/358 and http://www.adafruit.com/products/618 - adafruit/Adafruit-ST7735-Library
also that should be a feather name
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