Recent Posts

Pages: [1] 2 3 ... 10
1
I´ve done some progress :)
Vid: Dropbox video

Code: [Select]
// Piny pro display
#define A 35
#define B 37
#define C 39
#define D 41
#define CIF1 53
#define CIF2 51
#define CIF3 49
#define CIF4 47
#define CIF5 45
#define CIF6 43

int tis = 0;
int destis = 0;
int sec = 0;
int dessec = 0;
int mit = 0;
int desmit = 0;
int x = 0;

// Fce pro zobrazovani cislic
void digit0 () {
  digitalWrite(A, LOW);
  digitalWrite(B, LOW);
  digitalWrite(C, LOW);
  digitalWrite(D, LOW);
};

void digit1 () {
  digitalWrite(A, HIGH);
  digitalWrite(B, LOW);
  digitalWrite(C, LOW);
  digitalWrite(D, LOW);
};

void digit2 () {
  digitalWrite(A, LOW);
  digitalWrite(B, HIGH);
  digitalWrite(C, LOW);
  digitalWrite(D, LOW);
};

void digit3 () {
  digitalWrite(A, HIGH);
  digitalWrite(B, HIGH);
  digitalWrite(C, LOW);
  digitalWrite(D, LOW);
};

void digit4 () {
  digitalWrite(A, LOW);
  digitalWrite(B, LOW);
  digitalWrite(C, HIGH);
  digitalWrite(D, LOW);
};

void digit5 () {
  digitalWrite(A, HIGH);
  digitalWrite(B, LOW);
  digitalWrite(C, HIGH);
  digitalWrite(D, LOW);
};

void digit6 () {
  digitalWrite(A, LOW);
  digitalWrite(B, HIGH);
  digitalWrite(C, HIGH);
  digitalWrite(D, LOW);
};

void digit7 () {
  digitalWrite(A, HIGH);
  digitalWrite(B, HIGH);
  digitalWrite(C, HIGH);
  digitalWrite(D, LOW);
};

void digit8 () {
  digitalWrite(A, LOW);
  digitalWrite(B, LOW);
  digitalWrite(C, LOW);
  digitalWrite(D, HIGH);
};

void digit9 () {
  digitalWrite(A, HIGH);
  digitalWrite(B, LOW);
  digitalWrite(C, LOW);
  digitalWrite(D, HIGH);
};

// Case fce pro zobrazeni cislic
void showDigit (int digit) {
  switch (digit) {
    case 0:
    digit0 ();
    break;
   
    case 1:
    digit1 ();
    break;
   
    case 2:
    digit2 ();
    break;
   
    case 3:
    digit3 ();
    break;
   
    case 4:
    digit4 ();
    break;
   
    case 5:
    digit5 ();
    break;
   
    case 6:
    digit6 ();
    break;
   
    case 7:
    digit7 ();
    break;
   
    case 8:
    digit8 ();
    break;
   
    case 9:
    digit9 ();
    break;
   
    default:
    break;
  };
};

// Setup fce pinu
void setup () {
  pinMode(A, OUTPUT);
  pinMode(B, OUTPUT);
  pinMode(C, OUTPUT);
  pinMode(D, OUTPUT);
 
  pinMode(CIF1, OUTPUT);
  pinMode(CIF2, OUTPUT);
  pinMode(CIF3, OUTPUT);
  pinMode(CIF4, OUTPUT);
  pinMode(CIF5, OUTPUT);
  pinMode(CIF6, OUTPUT);
};

// Loop fce
void loop () {
while(desmit < 10) {
  mit = 0;
  showDigit (mit);
    digitalWrite(CIF5, HIGH);
    x = 0;
    digitalWrite(CIF5, LOW);
 
while(mit < 10) {
  dessec = 0;
  showDigit (dessec);
    digitalWrite(CIF4, HIGH);
    x = 0;
    digitalWrite(CIF4, LOW);
 
while(dessec < 6) {
  sec = 0;
  showDigit (sec);
    digitalWrite(CIF3, HIGH);
    x = 0;
    digitalWrite(CIF3, LOW);
 
while(sec < 10) {
  destis = 0;
  showDigit (destis);
    digitalWrite(CIF2, HIGH);
    x = 0;
    digitalWrite(CIF2, LOW);
 
while(destis < 10) {
  tis = 0;
  showDigit (tis);
    digitalWrite(CIF1, HIGH);
    x = 0;
    digitalWrite(CIF1, LOW);
 
while(tis < 10){
    showDigit (tis);
    digitalWrite(CIF1, HIGH);
    x = 0;
    digitalWrite(CIF1, LOW);
    delay (10);
    tis += 1;
}
destis += 1;
showDigit (destis);
    digitalWrite(CIF2, HIGH);
    x = 0;
    digitalWrite(CIF2, LOW);
}
sec += 1;
showDigit (sec);
    digitalWrite(CIF3, HIGH);
    x = 0;
    digitalWrite(CIF3, LOW);
 showDigit (dessec);
    digitalWrite(CIF4, HIGH);
    x = 0;
    digitalWrite(CIF4, LOW);   
}
dessec += 1;
showDigit (dessec);
    digitalWrite(CIF4, HIGH);
    x = 0;
    digitalWrite(CIF4, LOW);
}
mit += 1;
showDigit (mit);
    digitalWrite(CIF5, HIGH);
    x = 0;
    digitalWrite(CIF5, LOW);   
}
desmit += 1;
showDigit (desmit);
    digitalWrite(CIF6, HIGH);
    x = 0;
    digitalWrite(CIF6, LOW);
}
};


P.S. each number is as big as my hand :)
I am not against any improvement :)
2
Device Hacking / Re: Hacked MEGA2560 and my "Su...
Last post by Krupski - Today at 07:56 pm
I find it especially curious that the regulator continued to function if it got to the point of melting solder...

Good work otherwise!

EDIT: Question, on the MEGA board on the first photo, the VIN and 5V pins are colored. Why did you do this?
So I know where those two are without having to look carefully. If I plugged a 5V thing into the Vin pin by mistake, the magic smoke might escape and then........

Plus, I know that the two grounds are between the power pins, so I'm all set.

BTW, I use the old hard drive power cable color code... red for 5V and yellow for 12V :smiley-mr-green:
3
Arduino Yún / Re: Arduino Yun Run Bash Scrip...
Last post by bjkellett - Today at 07:56 pm
well, I'm clueless here, as you guessed.  Here are some of my feeble attempts of shebanging python.

root@yunbjk:/mnt/sda1# which python
/usr/bin/python
root@yunbjk:/mnt/sda1# printer.py
-ash: printer.py: not found
root@yunbjk:/mnt/sda1# cat printer.py
#!/usr/bin/python

print("is this working?")
root@yunbjk:/mnt/sda1#

root@yunbjk:/mnt/sda1# python
Python 2.7.3 (default, Apr 11 2014, 04:38:09)
[GCC 4.6.3 20120201 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print("whats up")
whats up
>>> exit()
root@yunbjk:/mnt/sda1#

____________
well anyway,

clueless in Rochester
4
Project Guidance / Re: Need some pointing in the ...
Last post by MatthewSH - Today at 07:55 pm
The SPI is a bus so it is possible to use them both. This is because on the spark Fun it says:-That means you can use that CS pin to talk to the SD card and pin 10 on the USB host. In theory at least. You might have to do something with the software to stop the host shield accessing the SPI bus while the SD card is being written to. But you would have to study and understand both software drivers to be sure. Note this means that you can't leave the SD card with an open file and access the host shield functions. One has to be closed down before you can use the other.
I might just see if there's another way of doing things. Maybe I can just use a USB storage device with the other stuff?

I'm not sure. I'm trying to save some money here since this is just a project for a class.
5
Le bar / Re: Mini CNC et autres
Last post by Artouste - Today at 07:54 pm
Bonjour Artouste,

Plage utile :
x = 270 mm
y = 180 mm
z = 40 mm

Utilisation principale : fabrication de PCB

Modélisation : Rhinoceros

@+
C'est un volume utile déjà bien interessant
tu table sur un cout de revient meca de quel ordre ?

6
Programming Questions / Re: serial.find()
Last post by Robin2 - Today at 07:54 pm
The documentation is so minimal, such a shame to write a library but fail to explain with a few good "hello world" /n examples.
I know it can be very frustrating but that is because nobody gets paid to write the documentation. It seems that people like writing programs but don't like writing documentation.

I have tried to make a little contribution with serial input basics

...R
7
Project Guidance / Re: Recognize specific object ...
Last post by AWOL - Today at 07:54 pm
Pixy?
8
Displays / Re: reliable / quality place t...
Last post by robotman777 - Today at 07:54 pm
Newhaven Display has quality displays but they don't have anything small like 128x64 unfortunately.
9
Quote
Has anyone used this app with the Sabertooth motor controllers?
http://www.dimensionengineering.com/products/sabertooth2x32
I am trying to determine how to integrate this app with the sabertooth libraries.
Hi SMadd,
First, have a look here and let us know if it helps



Quote
Is it possible to implement elementarny joystick to the following protocol
X
0xFD 0x02 0x00 0x52 0x43 0x0A data-low-byte data-high-byte crc-low-byte crc-high-byte
Y
0xFD 0x02 0x00 0x52 0x43 0x0B data-low-byte data-high-byte crc-low-byte crc-high-byte
Checksum
http://mbed.org/users/shimniok/code/AVC_2012/file/826c6171fc1b/MAVlink/include/checksum.h
To avoid potential problems, the communication protocol is hardcoded in the App and cannot be changed easily

10
General Discussion / Re: Suggestion for Multimeter
Last post by cr0sh - Today at 07:53 pm
If you're NOT going to get anywhere near household voltages (110V, 220V), go to someplace like harbor freight and get a couple of their really cheap digital meters. http://www.harborfreight.com/7-function-multimeter-98025.html (they frequently go on sale for about half that price...)
Sometimes, if you wait long enough, you'll get or find a flyer with a coupon on it to get a free one.

It's not a fluke, and it's not even safe to use on 440V industrial AC (110V is "marginal"), and it won't have stellar accuracy.  But it's almost certainly good enough for almost anything arduino-associated, and having two (to simultaneously measure current and voltage) is more useful than having a better meter.  IMO.
I've never had a problem with measuring household voltages using one, but YMMV I suppose; I certainly wouldn't go beyond such a voltage, and I agree that they are perfect for Arduino hobbyist use. Also, don't attempt to measure high currents with them - the wire the leads are made out of vary considerably in quality (I once had some leads with only 4-5 strands of wire in them).
Pages: [1] 2 3 ... 10

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy