Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need the Arduino code for this question please Problem 2: A single, common-ano

ID: 3863499 • Letter: I

Question


I need the Arduino code for this question please Problem 2: A single, common-anode, 7-segment LED is connected to the Arduino Connector J1 through current-limiting resistors. The diagram in Figure 2 shows the mapping of the pins of the connector to the pims of the 7-segment. Thus, by outputting a byte to the pins of connector Ji, we can display a character. Write an Arduino program that displays the sequence of characters S-O-S-(blank), each character displayed for second. This sequence should repeat. Use the DDR. Data, and Bit registers. A B C D E F Gl Figure 2: Seven Segment Display HINT: Note that all the bits of Jl are connected to ATMega port D. By setting these bits as output bits, and setting the bits to 10010100, the character 3 is displayed (the LEDs are asserted low). (latch the pins of the J1 connector to their corresponding LED segment To Do Courses Calendar Notifications Messages

Explanation / Answer

static double c = -0.618; // double c = [(1-sqrt(5))/2] = - 0.618 /** * Computes the fibonacci series * @param n * @return */ private static double fibo(int n){ if (n == 0) return 1; else if (n == 1) return c; else { double result = fibo(n - 1) + fibo(n - 2); return result; } }