Hot answers tagged

4

Looks like you have it wired wrong. A schematic would really help but it looks like you've got 5V going directly into the sensors data line (yellow wire) it's connected on your breadboard to the orange wire +5V. The power wire of your temperature sensor (red wire) is running through a 4.7K resistor which is not likely what you wanted here either.


3

You keep calling new to allocate memory but you never free it. This is a memory leak and eventually you run out. Instead of constantly creating new arrays, why don't you make those global or static. Or even just local arrays if you don't need them to be persistent. On a microcontroller you really don't want to be using new unless absolutely necessary.


3

You never exit the ISR, hence all interrupts are disabled. Do the minimum work possible within an ISR, and have the main loop outside.


3

The Arduino doesn't care what pin you use for SS since you just use digitalWrite() on it anyway. You use any pin you like for one slave, so you can use any other pin you like for another slave. The ATMega-based boards need pin 10 to be set as an output for SPI to function, but you don't then have to use that for the actual slave select. The only time it ...


2

You had the following general problem: The code you were using was configuring a pin into INPUT mode and reading the value on it. On this pin you conencted a button without extern pullup or pulldown resistor. This means that if the button is not pressed, it is not connected to anything and thus a floating pin. You cannot realibly read the value of the ...


2

48 MHz is a multiple of 16MHz. Why not just adjust the timing code to account?


2

I tried changing the strings to char's, that didn't work. Verified that it was closing connections with the server, check. Was reading around and saw someone who tried a soft reset of the wifi client here. I added the following to the end of my httpRequest() method client.stop(); WiFi.end(); delay(10); WiFi.begin(ssid, pass); And now it's working just ...


2

There are a couple of levels of names in your question, so here are how they fit together: ESP8266 - This is the bare chip found in the wide range of "esp8266"-based boards/modules/etc. The chip itself has no flash storage, no clock/oscillator, and no voltage regulation. The I/O pins on the ESP8266 bare chip have labels like GPIO0, GPIO1, etc. Chip ...


2

If you look into that github source code, you can see startAP function and mainly rows with strM2MAPConfig.au8DHCPServerIP: uint8_t WiFiClass::startAP(const char *ssid, uint8_t u8SecType, const void *pvAuthInfo, uint8_t channel) { tstrM2MAPConfig strM2MAPConfig; if (!_init) { init(); } if (channel == 0) { channel = 1; // ...


2

On 32 bit systems, uint32_t is usually the same as unsigned int and unsigned long. You should be able to parse the number using strtoul(), which is quite standard and returns an unsigned long.


1

You can free choose pins used by SPI master to select slaves, but if possible use the default expected by the library. With MKR and other SAMD Arduino boards use the same default SPI slave select pins as for AVR boards, because same libraries are used. Ethernet library has default SS pin 10 and SD library pin 4.


1

When a library does not highlight, it might be that the library is not coded to be highlighted (see here). If you installed the library yourself, you may have put it in the wrong path.


1

The TIP120 is a poor choice because of the approximate 10% - 14% voltage drop across it. Try the circuit with a logic level, low Rds MOSFET. For a more in-depth answer, please see this answer: https://electronics.stackexchange.com/a/388468/165322


1

You don't really need your regulator. That board has a connection (X1) intended for directly connecting two AA batteries (according to the schematic). However, if you want to keep it regulated at 3.3V for other reasons (the MCU will happily run from as low as about 1.62V) then sure - use your regulator. But just treat it like batteries regardless. Connect ...


1

I found a tutorial that explains exactly what Majenko and Juraj explained, https://www.instructables.com/id/MKR1000-IoT-Clientserver-Communications/ the library code that the tutorial references is useful, the tutorial is useful to us learning communication


1

WiFiClient object wraps a TCP socket. A normal TCP socket is connected to IP address and port. WiFiServer starts a listening socket on a port. If server on listening socket is contacted by a remote client socket, it creates a local socket connected with the remote client socket on a free port and returns a WiFiClient object wrapping the socket. Everything ...


1

By definition, the I2S bus only allows up to 2 channels to be transmitted at the same time. Here is a quote from the Details section of the Wikipedia's I2S page: The word select clock lets the device know whether channel 0 or channel 1 is currently being sent, because I²S allows two channels to be sent on the same data line. This is further ...


1

It may be possible if you can write your own bootloader, but it certainly won't be easy. The normal way of doing OTA updates is to use a chip that has segmentable and remappable flash memory (such as the ESP32, ESP8266, PIC32MZ, etc) where your sketch is running from one segment, and that loads the new code from whatever source into the other segment. It ...


1

It appears the tutorial is now outdated and the PubNum library does not need the changes described in the tutorial. The PubNub library has an example titled PubNubWifi101 which shows the client type being set with a #define before including the PubNub headers: #include <WiFi101.h> #define PubNub_BASE_CLIENT WiFiClient #include <PubNub.h> I don'...


1

If the number of slaves is large, consider using a multiplexed arrangement for select lines. As an example, the 16-pin 74LS138 Decoder/Demultiplexer pulls one of eight lines low depending on the state of its three address lines, while the 24-pin 74LS154 pulls one of sixteen lines low depending on the state of its four address lines. Both of these chips ...


1

The dependency on the clock speed is hidden in the implementation of the delay() function. It works with 'human readable' milliseconds. Hertz is count of repeating in one second. One second has 1000 ms. So with 200 ms delay, 5 repeating happen in a second. Then the frequency is 5 Hz.


1

It is unclear exactly what you are trying to do, however the frequency generated by the code would be ~5Hz - corresponding to a period of 200mS


1

On one end of the MKR GSM 1400 is a U.FL antenna connector. To that you need to connect a U.FL To Female SMA Adaptor. That adaptor can then screw into an SMA GSM Antenna of your choice.


1

You can use the adapter because: the adapter uses an AMS1117 to generate 3.3V to supply the SD card and the level shifter the level shifter is a 74LVC125 which uses 3.3V and works with 3.3V (and accepts up to 5V as input level) The adapter works for 3.3V and 5V systems as long as 5V power is available.


1

Catalex Micro SD Card Adapter has built-in level converter in a form of 74LVC125A 3-state buffer. This buffer chip needs 1.65 to 3.6V voltage supply. The +5V from your Arduino is lowered to 3.3V by the adapter (as seen in the schematics, just change 74ABT125 to 74LVC125A). Link to 74LVC125A Link to Catalex Adapter schematic To operate the adapter you would ...


1

The SD card is a 3.3 V device. The 5 V module with SD card adapter steps down the voltage for powering the card and has logic level conversion for card's SPI pins. If you want to connect SD card to a 3.3 V board it is better to use a simple breakout board without power and signal conversion. I do not recommend you to connect a 5 V SPI device to MKR SPI ...


1

A problem in the include file on the line previous could cause the following line to be misinterpreted. To test that try moving the ssid after the password and see if the error changes. Obviously make sure all strings are properly quoted. #include <WiFi101.h> #include <WiFiSSLClient.h> const char* password = "SYDTSTQR"; // your network ...


1

The solution is to update the certificates the WIFI 101 Firmware Updater tool (in the Arduino IDE). Install the FirmwareUpdater sketch, as described on the Arduino site. Select Tools -> WiFi 101 Firmware Updater. Click on the Add domain button at the bottom, enter your domain and click Upload Certificates to WiFi module. Upload the sketch to your Arduino. ...


1

At the bottom of the page for the client code link you provided, there's a link to a Chat Server example. If you study the code I think you'll see how to send and receive the potentiometer reading. Hint: Look in the code where it echoes what it receives. mkr1000 WiFi Chat Server


1

this workes: if (messageSize > 0) { //Serial.println(client.readString()); String input = client.readString(); Serial.println(input); looks like reading from the method readString() empties the buffer hence cant use it again, what I did is store it on a String object variable "input" and use that. It worked.


Only top voted, non community-wiki answers of a minimum length are eligible