code successfully run on Arduino uno and display data very well, but when i put this code on atmega 8a then there is no display... this code about 5kb so i want to use atmega 8a instead of 328pu..
#include <AceWire.h>
#include <SevenSegmentDisplay.h>
#include <Wire.h>
#include <AHT10.h>
//============================================================================
// Name : TempControl.ino
// Author : Romualdo Dasig
// Version : v0.1
// Copyright : MIT License
// Description : Display temperature to a Seven Segment LED Display
//============================================================================
// Libraries
AHT10 myAHT10(0x38);
// Setup Sensor.
// Variables
float temp; // Temperature
float hum; // Humidity
// Variable to store current time.
unsigned long previousMillis = 0;
// Set interval to read temperature.
const long interval = 5000;
// Configure a 2-Digit 7-Segment Display.
int segments[7] = {3, 4, 7, 6, 5, 10, 8}; // Display segments (a,b,c,d,e,f,g)
int displays[2] = {12, 11}; // Display digits (00 - 99)
int type = COMMON_ANODE; // Type
SevenSegmentDisplay sevenSegmentDisplay(
segments[0],
segments[1],
segments[2],
segments[3],
segments[4],
segments[5],
segments[6],
displays[0],
displays[1],
type
);
void setup()
{
Wire.begin();
Serial.begin(9600);
if (!myAHT10.begin()) {
Serial.println("Couldn't find sensor!");
while (1);
}
sevenSegmentDisplay.begin();
}
void loop()
{
// Get current time in milliseconds.
unsigned long currentMillis = millis();
// Read temperature every 2 seconds.
if (currentMillis - previousMillis >= interval) {
// Save the last time we've read the temperature.
previousMillis = currentMillis;
// Read data and store it to variables hum and temp.
hum = myAHT10.readHumidity();
//temp= dht.readTemperature();
}
// Display temperature.
sevenSegmentDisplay.display(hum);
}