Recent Posts

Pages: [1] 2 3 ... 10
1
General Electronics / Re: Split GPS Signal
Last post by jremington - Today at 01:10 am
Properly designed and impedance matched antennas are absolutely critical for weak signal detection, as in GPS receivers.

Unless you can find a signal splitter intended for your presumed "active antenna", anything you patch together is unlikely to work well, and may not work at all.
2
Displays / Re: Graphics library for NodeM...
Last post by bodmer - Today at 01:06 am
Hi David,

The 2 bit greyscale helps with font appearance but it is noticeably worse on smaller characters.  4 bit is good with little noticeable difference, the 565 16 bit encoding of colours limits the greyscale resolution anyway. You have probably figured out this is easy to test this by adapting the alphaBlend() function.

You will probably also notice that small or fine (single pixel line) fonts look less attractive than simple bitmaps, using larger or bold fonts works well. Italic fonts seem to render well even in small sizes.

Run length encoding is also very effective at reducing the font file size, as is omitting characters that are not needed!

SPIFFS seems to be smart and buffers the font in ~24kbyte blocks so file seeks are fast for each character until a new block of memory has to be loaded, then there is a ~30ms overhead for the next character. Thus it is good to keep the font file size down if fast rendering is needed.

If you use UTF8 encoded characters out of the normal ASCII range, then there is  "gotcha" that puzzled me for a while, the Arduino IDE has a bug where UTF8 characters in the sketch do not get encoded in the compiled code unless the sketch is saved before upload!
3
Deutsch / Re: Höhere Frequenzen aus Serv...
Last post by uwefed - Today at 01:06 am
AnalogWrite hat keine so feine Auflösung wie ein Servodsignal. Bei 50 Hz sind nur wenige Werte brauchbar.

Ein Hardware-PWM Signal kann nicht 400Hz haben, weil nur wenige Teiler möglich sind.

Grüße Uwe   
4
I tried with both directions directly and it works yes :) And with 400ms, It worked before for 10-15 mins as I stated in my original post so I'm assuming it's enough but I tried with another basic code which has 3000ms delay, still not working. I'm completely sure that it's not about the code or the digital pin triggering. It all works fine, just does not affect the relay at all.

Any further ideas?

Thanks for all the input btw. Really appreciate it.
Well, my first Arduino project was a Peltier cooler/heater using relays to turn the 12 volts on/off and to switch the direction of the current, much as you have done. I had relay problems and replaced relays on the little boards more than once.

I carefully dissected the relays and one had contacts welded together. One had some build up of insulating material on the contacts. No clue where that came from. They are really, really cheap! Just because they have ratings printed on the box, doesn't mean much.

Time for you to get more relay boards!

Paul
5
Displays / Re: 2.8" LCD TFT touch shield ...
Last post by 6v6gt - Today at 01:05 am
If the tft screen is really a shield designed for your Mega, then the wiring is the least of your problems. It simply plugs in. Anyway, post a link as requested and much should be revealed. There's a huge variety of similar looking screens out there with different, controllers, pin configurations, voltage tolerance, internal wiring, register settings, addresses etc. etc. Like snowflakes, no two are ever the same.
6
Oh yes, indeed.  You had two different y variables there, one in loop and another in the while loop.  Can't believe I missed that.
7
You can't directly access the boards.txt properties from the sketch. However, you can do so from platform.txt, where it's possible to set macros to the boards.txt properties values using the -D compiler flag. In fact there is a macro already defined using {build.board}, but it's not quite what you're looking for because the property value is for the macro name, rather than the macro value:
Code: [Select]
-DARDUINO_{build.board}
So you could do something like this:
Code: [Select]
#ifdef ARDUINO_AVR_UNO
Serial.println("It's an Uno");
#endif


So you'd need to modify platform.txt to do anything like what you want. The Arduino IDE has a useful feature where you can create a file named platform.local.txt next to platform.txt. The definitions in platform.local.txt will override any of the same name in platform.txt so this allows you to make modifications to platform.txt without ever touching platform.txt. So if you create a platform.local.txt that contains this line:
Code: [Select]
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mmcu={build.mcu} -DBUILD_BOARD="{build.board}" -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
then BUILD_BOARD will be defined according to the {build.board} property value for .ino and .cpp files. There are other recipes for .c and .S.
8
I kept playing around with the code and I found out that the reason the code kept messing up is because the declaration of the value that changes is an int once you remove int the code works like it is supposed to.
9
http://plugins.netbeans.org/plugin/46054/arduino
10
I am trying to understand LCD Character generation example under the  "Examples", and I could not understand the following codes, can some one help me on that?

 // Print a message to the lcd.
  lcd.print("I ");
  lcd.write(byte(0)); // when calling lcd.write() '0' must be cast as a byte  
  lcd.print(" Arduino! ");
  lcd.write((byte)1);


i.e    lcd.write(byte(0));               ---------?????
and
lcd.write(byte(1));                       ----------???

Your help is greatly appreciated!
Panch
Pages: [1] 2 3 ... 10