user10134: i've got a seven-segment-display on my arduino-nano and want to write some numbers on it. The problem is that HIGH and LOW seems to be reversed.
If the output should be 
0

it displays 
-

I could solve this, replacing all HIGH and LOW through HIGHX and LOWX, and defining them reversed:
 #define HIGHX 0x0
 #define LOWX 0x1

but this is reversed and not a good solution...
The wiring is correct like this (just GND not connected):

But if i connect the GND, the hole display isn't showing something anymore.

user6834: With the given schematic both your logic for segments and digits should be active high, so it looks like you made a mistake. Especially because you say it doesn't work anymore when you connect ground. Check that you have the right transistor and that it's connected correctly: Emitter should go to ground, collector to the display's common cathode. (Check that your displays are common cathode!)
It's not a good idea to define some version of high as low, that's only confusing. Instead name the signals:
#define DISPLAY_SEGMENT_ON HIGH
#define DISPLAY_DIGIT_ON HIGH

The image can be found at several places on the Internet, so I guess you didn't draw it. This is a common cathode display, and the transistors are NPN types. If your displays are common anode then the whole thing flips upside-down: The Ground rail becomes Vcc, and the NPN transistors should be PNP types. Then you will indeed have inverted logic, and you should define:
#define DISPLAY_SEGMENT_ON LOW
#define DISPLAY_DIGIT_ON LOW


10134: <p>i've got a seven-segment-display on my arduino-nano and want to write some numbers on it. The problem is that HIGH and LOW seems to be reversed.
If the output should be </p>

<pre><code>0
</code></pre>

<p>it displays </p>

<pre><code>-
</code></pre>

<p>I could solve this, replacing all HIGH and LOW through HIGHX and LOWX, and defining them reversed:</p>

<pre><code> #define HIGHX 0x0
 #define LOWX 0x1
</code></pre>

<p>but this is reversed and not a <em>good</em> solution...<br><br></p>

<p>The wiring is correct like this (just GND not connected):
<img src="https://i.stack.imgur.com/DwotM.png" alt="enter image description here"></p>

<p>But if i connect the GND, the hole display isn't showing something anymore.</p>
 6834: <p>With the given schematic both your logic for segments and digits should be active high, so it looks like you made a mistake. Especially because you say it doesn't work anymore when you connect ground. Check that you have the right transistor and that it's connected correctly: Emitter should go to ground, collector to the display's common cathode. (Check that your displays are common <em>cathode</em>!)</p>

<p>It's not a good idea to define some version of high as low, that's only confusing. Instead name the signals:</p>



<pre class="lang-cpp prettyprint-override"><code>#define DISPLAY_SEGMENT_ON HIGH
#define DISPLAY_DIGIT_ON HIGH
</code></pre>

<p>The image can be found at several places on the Internet, so I guess you didn't draw it. This is a <strong>common cathode</strong> display, and the transistors are <strong>NPN</strong> types. If your displays are <strong>common anode</strong> then the whole thing flips upside-down: The Ground rail becomes Vcc, and the NPN transistors should be <strong>PNP</strong> types. Then you will indeed have inverted logic, and you should define:</p>

<pre class="lang-cpp prettyprint-override"><code>#define DISPLAY_SEGMENT_ON LOW
#define DISPLAY_DIGIT_ON LOW
</code></pre>
