Recent Posts

Pages: [1] 2 3 ... 10
Deutsch / Re: Hilfe mit Sim 900 modul
Last post by HotSystems - Today at 06:07 pm
Und warum muss der Taster länger gedrückt werden ?
Normal drückt man kurz drauf und der Anruf geht raus.
Reicht das nicht ?
Project Guidance / Re: Best way to detect an obje...
Last post by INTP - Today at 06:06 pm
You won't get much smaller than SMD components if you go with IR. But since you have a bunch of circuitry elsewhere, a capacitive wire working as an antenna would be less obvious even though it'd be bigger in a way. Capacitive is going to need some fine tuning, though. Play just with an Arduino and the capsense library and read that guide to get started.
Storage / Re: Buffered read for audio fr...
Last post by el_supremo - Today at 06:04 pm
If I understand the snippet that you posted, the data on the card are written as ASCII strings. That is a very inefficient way to store audio data. You should have written the audio samples in binary. Each sample would then be exactly two bytes and would allow you to read, say, 512 bytes into a buffer and then you can write the 256 samples from there.

Which Arduino are you using?

I don't see a screenshot.

And if it shows code or errors or serial monitor, don't bother. Copy and paste here using code tags (or, in case to big, attach it).
Project Guidance / Re: Vehicle speed sensor
Last post by dexterbug - Today at 06:03 pm
OK so I uploaded the sketch to my arduino nano and it didnt work.

I got out my multimeter and measured the VSS going into PIN D5 at 40mph and its actually 60hz. So my information about 8000 pulses per mile must be incorrect.

Any way I carried on driving but didnt get any output from Pin A0 at any speed.

Deutsch / Re: Hilfe mit Sim 900 modul
Last post by Hannnnes - Today at 06:02 pm
Ja den habe ich dran da er sonst schon ausgelöst hat wenn man nur mit dem finger auf den PIN ist :D
General Electronics / Re: Regulators, Diodes, and Po...
Last post by MarkT - Today at 06:01 pm
3) Maybe use two 1M resistors, and a 100nF capacitor across the lower resistor (to prevent noise pickup and
lower the impedance for the analog pins.
Programming Questions / servo duplo
Last post by lazaroracing - Today at 06:01 pm
Ola pessoal

Entrei no mundo Arduino a pouco tempo

Estou com uma dificuldade em um Sketch

Tenho um projeto com servo motor e gostaria de uma ajuda , vou ver se consigo explicar;
- 2 servos , - 2 puch buttom ; quero controlar um dos servos e o outro servo e controlado pelo primeiro atraves do angulo
vou dar um exeplo (ao apertar o buttom o servo anda de ¨0 a 50¨ graus depois que chegar a os 50 graus  o outro anda de ¨0 a 30¨ graus ao chegar os 30 graus
 quando atinjir os 30 graus o primeiro servo continua de onde parou e vai de ¨50 a 99¨ graus    agradeço a ajuda

Se alguem tiver dificuldade em entender explico melhor 

Programming Questions / Ethernet Shield setup
Last post by Doug101 - Today at 06:01 pm
I have a 2560 and an ethernet shield.  I'm just getting started with this project and this is my first time using an Ethernet shied.   I've been at the documents and for examples explaining how to configure an Ethernet shield.  Following is from Examples/Ethernet/UdpNtpClient.

In the different examples I'm finding sometimes #include <SPI.h> is used and other times it's not.
Is there a simple guide or explanation on how to configure the Ethernet shield and an explanations of the commands?

I'm working on a home automation project to control lights.  As in button press, turn light on for say 15 minutes.  These would all be time differential calculations based so actual time is not needed. 

Reason I'm using the Ethernet shield is I would also like to control some lights and the garden sprinklers based on actual time so I need to set the clock from an NTP server.

Not sure if there's better code, but this is where I am starting with.

Would like to know what the first three includes are doing.

And then I would like to use a static IP address.

Would appreciate assistance.


Code: [Select]
// Home

#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>

byte mac[] = {     
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};  //  MAC address assigned to varible mac as byte.

unsigned int localPort = 8888;       // local port to listen for UDP packets

char timeServer[] = ""; // NTP server

const int NTP_PACKET_SIZE = 48; // NTP time stamp is in the first 48 bytes of the message

byte packetBuffer[ NTP_PACKET_SIZE]; //buffer to hold incoming and outgoing packets

// A UDP instance to let us send and receive packets over UDP
EthernetUDP Udp;

//  +++++++++++ SETUP  ++++++++++++++++++++++++++++++++++
void setup() {
  // put your setup code here, to run once:
 // Open serial communications and wait for port to open:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only

  // start Ethernet and UDP
  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
    for (;;)


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

sendNTPpacket(timeServer); // send an NTP packet to a time server

  // wait to see if a reply is available
  if (Udp.parsePacket()) {
    // We've received a packet, read the data from it, NTP_PACKET_SIZE); // read the packet into the buffer

    // the timestamp starts at byte 40 of the received packet and is four bytes,
    // or two words, long. First, extract the two words:

    unsigned long highWord = word(packetBuffer[40], packetBuffer[41]);
    unsigned long lowWord = word(packetBuffer[42], packetBuffer[43]);
    // combine the four bytes (two words) into a long integer
    // this is NTP time (seconds since Jan 1 1900):
    unsigned long secsSince1900 = highWord << 16 | lowWord;
    Serial.print("Seconds since Jan 1 1900 = ");

    // now convert NTP time into everyday time:
    Serial.print("Unix time = ");
    // Unix time starts on Jan 1 1970. In seconds, that's 2208988800:
    const unsigned long seventyYears = 2208988800UL;
    // subtract seventy years:
    unsigned long epoch = secsSince1900 - seventyYears;
    // print Unix time:

    // print the hour, minute and second:
    Serial.print("The UTC time is ");       // UTC is the time at Greenwich Meridian (GMT)
    Serial.print((epoch  % 86400L) / 3600); // print the hour (86400 equals secs per day)
    if (((epoch % 3600) / 60) < 10) {
      // In the first 10 minutes of each hour, we'll want a leading '0'
    Serial.print((epoch  % 3600) / 60); // print the minute (3600 equals secs per minute)
    if ((epoch % 60) < 10) {
      // In the first 10 seconds of each minute, we'll want a leading '0'
    Serial.println(epoch % 60); // print the second
  // wait ten seconds before asking for the time again

// send an NTP request to the time server at the given address
void sendNTPpacket(char* address) {
  // set all bytes in the buffer to 0
  memset(packetBuffer, 0, NTP_PACKET_SIZE);
  // Initialize values needed to form NTP request
  // (see URL above for details on the packets)
  packetBuffer[0] = 0b11100011;   // LI, Version, Mode
  packetBuffer[1] = 0;     // Stratum, or type of clock
  packetBuffer[2] = 6;     // Polling Interval
  packetBuffer[3] = 0xEC;  // Peer Clock Precision
  // 8 bytes of zero for Root Delay & Root Dispersion
  packetBuffer[12]  = 49;
  packetBuffer[13]  = 0x4E;
  packetBuffer[14]  = 49;
  packetBuffer[15]  = 52;

  // all NTP fields have been given values, now
  // you can send a packet requesting a timestamp:
  Udp.beginPacket(address, 123); //NTP requests are to port 123
  Udp.write(packetBuffer, NTP_PACKET_SIZE);

Displays / Re: ssd1306 trottle display
Last post by david_prentice - Today at 06:00 pm
The drawBitmap() method has several variants.   You want:
Code: [Select]

//  display.drawBitmap(x, y, throttle16, w, h, WHITE);
  display.drawBitmap(32, 0, throttle16, 16, 16, WHITE);

Change the x, y arguments to place elsewhere on the screen.
It looks as if your image is 16x16.   Hence w, h.

Pages: [1] 2 3 ... 10