Sabtu, 11 Februari 2023

Speaking - God of War (Chinese Movie)

I was just delivering a pill, why are you chasing me ?

Aku baru saja mengantarkan pil, kenapa kalian mengejarku (untuk menangkap) ?


Where am I ?

Dimana saya ?


Could she have run to the Ice Palace in Sea of Immortality ?

Mungkinkah dia lari ke Istana Es di Laut Keabadian ?


Let's report to our superior first. If she did, it's a major sin.

Mari kita laporkan ke atasan kita terlebih dahulu. Jika dia melakukannya, itu adalah dosa besar.

Rabu, 18 Januari 2023

Bilangan Prima 0 Sampai 1.000.000

 Masukkan angka maksimum = 1000000

Daftar bilangan prima dari 0 hingga 1000000 :


2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 457 461 463 467 479 487 491 499 503 509 521 523 541 547 557 563 569 571 577 587 593 599 601 607 613 617 619 631 641 643 647 653 659 661 673 677 683 691 701 709 719 727 733 739 743 751 757 761 769 773 787 797 809 811 821 823 827 829 839 853 857 859 863 877 881 883 887 907 911 919 929 937 941 947 953 967 971 977 983 991 997 1009 1013 1019 1021 1031 1033 1039 1049 1051 1061 1063 1069 1087 1091 1093 1097 1103 1109 1117 1123 1129 1151 1153 1163 1171 1181 1187 1193 1201 1213 1217 1223 1229 1231 1237 1249 1259 1277 1279 1283 1289 1291 1297 1301 1303 1307 1319 1321 1327 1361 1367 1373 1381 1399 1409 1423 1427 1429 1433 1439 1447 1451 1453 1459 1471 1481 1483 1487 1489 1493 1499 1511 1523 1531 1543 1549 1553 1559 1567 1571 1579 1583 1597 1601 1607 1609 1613 1619 1621 1627 1637 1657 1663 1667 1669 1693 1697 1699 1709 1721 1723 1733 1741 1747 1753 1759 1777 1783 1787 1789 1801 1811 1823 1831 1847 1861 1867 1871 1873 1877 1879 1889 1901 1907 1913 1931 1933 1949 1951 1973 1979 1987 1993 1997 1999 2003 2011 2017 2027 2029 2039 2053 2063 2069 2081 2083 2087 2089 2099 2111 2113 2129 2131 2137 2141 2143 2153 2161 2179 2203 2207 2213 2221 2237 2239 2243 2251 2267 2269 2273 2281 2287 2293 2297 2309 2311 2333 2339 2341 2347 2351 2357 2371 2377 2381 2383 2389 2393 2399 2411 2417 2423 2437 2441 2447 2459 2467 2473 2477 2503 2521 2531 2539 2543 2549 2551 2557 2579 2591 2593 2609 2617 2621 2633 2647 2657 2659 2663

Sabtu, 21 Mei 2022

20220521 (1) - Belajar Grammar, Vocabulary, & Translate (Model ASSURE)

Note:
This content was written in order to learn english grammar, vocabulary and translation which including reliable materials and come from valid sources as it is listed.

Catatan:
Konten ini dibuat dalam rangka untuk pembelajaran bahasa inggris (grammar, vocabulary, dan translate) yang berisi materi-materi yang valid dan berasal dari sumber yang valid pula, sebagaimana tercantum.


Source 1: https://www.instructionaldesign.org/models/assure/

ASSURE

The ASSURE model is an ISD (Instructional Systems Design) process that was modified to be used by teachers in the regular classroom  The ISD process is one in which teachers and trainers can use to design and develop the most appropriate learning environment for their students.  You can use this process in writing your lesson plans and in improving teaching and learning.

Model ASSURE adalah sebuah proses DSI (Desain Sistem Instruksional) yang telah dimodifikasi untuk digunakan oleh guru di kelas reguler. Proses desain sistem instruksional adalah satu, dimana para guru dan pelatih dapat menggunakannya untuk merancang dan mengembangkan lingkungan belajar yang paling tepat untuk siswa mereka. Anda dapat menggunakan proses ini untuk menulis recana belajar yang akan dilakukan dan untuk meningkatkan pengajaran dan pembelajaran.

The ASSURE model incorporates Robert Gagne’s events of instruction to assure effective use of media in instruction.

A — Analyze learners
S — State standards & objectives
S — Select strategies, technology, media & materials
U — Utilize technology, media & materials
R — Require learner participation
E — Evaluate & revise

Model ASSURE menggabungkan teori Robert Gagne tentang 9 peristiwa dalam pembelajaran untuk memastikan penggunaan media yang efektif dalam pembelajaran.

A -- Menganalisa peserta didik
S -- Menyatakan standar dan tujuan
S -- Memilih strategi, teknologi, media dan bahan
U -- Memanfaatkan teknologi, media dan bahan
R -- Melibatkan partisipasi peserta didik
E -- Mengevaluasi dan merevisi

Sharon Smaldino: About the Model 

Oleh Sharon Smaldino: Tentang Model ASSURE
“To ASSURE good learning, I believe it is not one single thing that a teacher or designer should consider, but I do believe that there are areas of emphasis.

First, ASSURE starts with looking at the learner in detail. Nothing you plan or design is effective unless you have taken the time to look at the learners. In Illinois, for example, it is now state law that ALL teachers must assess their students’ knowledge and skills prior to instruction to ensure that they differentiate instruction. That means that by understanding where the learners are at the start of instruction, a teacher will make every effort to assist all learners to be successful in their learning endeavors. This new direction supports my position about knowing the learner. I feel that knowing as much as possible about your learners is critical to design and implementation of instruction.

Untuk menjamin terlaksananya pembelajaran yang baik, saya yakin itu tidaklah cukup dengan satu hal bahwa guru atau desainer harus mempertimbangkan, akan tetapi saya yakin bahwa ada aspek-aspek yang harus ditekankan.
Pertama, ASSURE memulainya dengan mengamati peserta didik secara rinci. Tak ada satupun pembelajaran yang anda rencanakan atau rancang akan berhasil dengan efektif, terkecuali anda telah meluangkan waktu sebelumnya untuk mengamati peserta didik. Di Illionis misalnya, saat ini telah menjadi undang-undang bahwa seluruh guru harus melakukan penilaian terhadap keterampilan dan pengetahuan siswa terlebih dahulu sebelum melaksanakan pembelajaran untuk memastikan bahwa guru membedakan pembelajaran. Itu berarti bahwa pembelajaran diawali dengan memahami dimana peserta didik berada, seorang guru akan melakukan segala upaya untuk membantu seluruh siswa agar berhasil dalam upaya keras belajar mereka. Haluan baru ini membantu posisi saya untuk mengenal peserta didik. Saya rasa bahwa mengenal sedalam mungkin terhadap peserta didik anda adalah sangat penting dalam merancang dan mengimplementasikan suatu pembelajaran.

Second, the second letter in ASSURE, S, refers to knowing the intended outcomes or expectations. No instruction should begin without everyone having a clear understanding of what is supposed to happen in the instruction. This does not preclude the possibility of additional learning taking place, but without a road map, some of your learners may well be “lost.” And, especially in the schools today, as we edge closer to the 100% of all students meeting or exceeding expectations, I believe that students need to know what is expected of them. I do believe that there is more than one “right way” to achieve those expectations and more than one “right medium” to use, because it’s not a one-size fits all world. BUT, as NCLB is still a mandate, we need to find ways to make it possible for our diverse learning population fit into the “mold” that has been outlined for us. Learners need to know what they are to do. And, I add that you cannot assess learning without knowing what was expected. NOW, because I opened that can of worms, let me quickly state that assessment can be formative and summative and can take multiple formats.
But, that is another cup of tea for sure.

Kedua, huruf yang kedua dalam ASSURE, S, merujuk pada memahami hasil atau harapan yang dikehendaki. Tidak ada pembelajaran patut untuk dimulai tanpa setiap personal yang terlibat memiliki pemahaman yang jelas terhadap apa yang dikehendaki untuk didapat dalam pembelajaran. Ini tidak menutup kemungkinan terjadinya permbelajaran tambahan, namun tanpa pedoman pelaksanaan yang jelas, beberapa peserta didik anda mungkin akan hilang. Dan, secara khusus di sekolah-sekolah saat ini, ketika kita akan mencapai angka 100% dari seluruh siswa yang memenuhi atau melebihi ekspektasi, saya yakin bahwa siswa perlu untuk mengetahui apa pencapaian yang diharapkan dari mereka. Saya sangat yakin bahwa ada lebih dari satu cara untuk mencapai ekspektasi ini dan lebih dari satu media yang dapat digunakan, karena hal tersebut bukanlah satu ukuran yang cocok untuk seluruh dunia. Akan tetapi, karena prisnip NCLB masih merupakan suatu mandat, kita perlu menemukan cara untuk membuat hal tersebut menjadi mungkin bagi populasi peserta didik kita yang beragam agar sesuai dengan kerangka yang telah diberikan pada kita. Peserta didik perlu untuk mengetahui apa yang akan mereka lakukan. Dan, saya menambahkan bahwa anda tidak akan dapat melakukan penilaian terhadap suatu pembelajaran tanpa mengetahui apa hasil yang diharapkan dari pembelajaran tersebut. Saat ini, dikarenakan saya telah membuka penutup suatu masalah kompleks, maka izinkan saya dengan segera menyatakan bahwa penilaian itu dapat berupa formatif dan sumatif, dan dapat dalam bentuk format yang beragam. Namun, Itu adalah satu hal lain yang membutuhkan secangkir teh dalam pembahasannya.

My final area of importance in the design and implementation process to ASSURE good learning is the reflection component of evaluation. Once you have completed the design and instruction and gathered the data about the outcomes and impressions from your learners, you need to take the time to consider what went well and what could be changed in that particular instructional event. This information will help you re-design that instructional event for future opportunities. But, this information also guides you on how to better address your learners in instruction beyond this particular instructional event. We often do not put enough emphasis on reflection as teachers and designers, but I do consider that it is not time wasted.

Oh, my goodness, it appears I’ve nearly written the chapter on the ASSURE model. I will close with the idea that it’s not about the technology and media. It’s about the learners and the important decisions we make as designers and
instructors to ensure successful learning opportunities.”

[From Michael M. Grant‘s Comparing Instructional Design Models]

____________________________________________________________________________



Source 2: https://elearningindustry.com/6-tips-apply-assure-model-blended-learning

6 Tips To Apply The ASSURE Model In Blended Learning

Summary: The ASSURE model is a natural fit for blended learning environments, as it gives corporate trainers the opportunity to integrate technology into their ILT (Instructor-Led Training) classrooms while still personalize the corporate training experience. In this article, I’ll explore the basic principles of the ASSURE model, and I’ll offer 6 tips that can help you use the ASSURE model in blended learning strategies.

How To Apply The ASSURE Model In Blended Learning: 6 Tips For eLearning Professionals 

While many blended learning approaches may strive to incorporate technology into the ILT environment, at PulseLearning we believe the ASSURE model takes it one step further by catering on the specific needs of the every learner. Rather than offering general tech tools or resources, it focuses on giving each learner the specific technology they require to achieve their personal goals and objectives.

What Is The ASSURE Model?

The ASSURE model gets its name from the following six stages involved in the process:

  • A: Analyze learners.
    Identify your learners’ expectations, goals, preferences, and needs, so that you can create a blended learning strategy that offers them real world benefits.
  • S: State goals and objectives.
    Determine the objectives for your blended learning course, including performance goals. These goals and objectives should clearly state what the learner will be able to do once they complete the class.
  • S: Select methods and media.
    Choose online learning content, multimedia, both online and classroom exercises and materials that will serve your training goals and objectives. This may also pertain to modifying current training content in order to meet the changing needs of your audience.
  • U: Utilize media and technology.
    After choosing the online training content and materials, eLearning professionals must then decide how they are going to utilize these tech tools and online resources most effectively.
  • R: Require learner participation.
    Determine how you can engage learners to encourage them to actively participate in the blended training experience.
  • E: Evaluate and revise the blended learning strategy.
    All eLearning strategies are a work in progress, due to the fact that technology and learner needs are always evolving. Thus, the final step in the ASSURE model is to evaluate and revise your blended learning strategy to ensure that it is as beneficial as possible.

6 Tips To Use The ASSURE Model In Blended Learning

  1. Conduct surveys and online assessments to research audience.
    To focus on the specific needs of your learners, you will first have to know what those needs are. Surveys, focus groups, interviews, and eLearning assessments are all valuable tools that can help you analyze your audience’s traits and experience levels. They can also give you a good indication of their learning styles, such as which exercises will appeal to them and how they absorb information.
  2. Create custom-tailored objectives.
    Aside from the organization-wide objectives and goals that you’ve created, you should also develop goals that are learner-specific. What learning behaviors do they need to display? What knowledge do they need to know by the end of the blended learning course? Is there a particular task they need to master or skills sets they must build? You must also have a way to test their knowledge and determine if they have actually met their goals and objectives.
  3. Choose tech tools that align with common goals.
    One of the most common blended learning strategy mistakes is using technology just for the sake of technology, rather than finding the tools that are ideal for the particular audience and training goals. Ideally, you should choose tools that your learners are already familiar with or have a minor learning curve, rather than those that may be difficult to master. For example, if you are developing a group collaboration online assignment that utilizes a project management platform, you must be sure that your learners can actually use the online platform when it’s time to work with their peers.
  4. Give the tech tools and materials a test-run.
    To verify that all of your tech tools are in working order and that your learners can use them effectively, it’s always a good idea to give your technology a test-run before you offer them to your learners. For example, if you are using tablets in the classroom, you should ensure that all of the devices are working properly, fully charged, and loaded with the right applications. If you are using an online tool, verify that your learners have all the information they need to access the online platform and that there aren’t any issues with logging into the site.
  5. Get learners involved.
    As is the case with all learning strategies, it is important to get your learners onboard and make sure they are all excited about the process. Start your discussions with thought-provoking questions that prompt them to seek out answers online and expand their knowledge. Create an online community forum where they can go to address concerns, get help from their peers, and stay in touch with their online facilitators. Ask for their feedback so that you can figure out what’s working effectively and what may need to be modified as you move forward with your ASSURE blended learning strategy. Get them involved, so that they feel as though they are a vital part of the blended learning experience and that their opinion matters.
  6. Understand that your ASSURE strategy is a work in progress.
    After you’ve created your ASSURE plan, you must keep in mind that it has to adapt with the changing needs of your learners. It must also adapt to the ever-evolving technologies, so that you can offer your future learners the best resources you have at your disposal. If there is a learning activity that is no longer serving the needs or goals of your learners, they you may want to consider modifying or omitting it from your training curriculum altogether. The same goes for your eLearning assessments, online training content, or even the level of tech integration. For instance, you may discover that your learners might benefit from even more tech tool usage.

The ASSURE model can help you not only blend technology with traditional classroom training, but give your learners the customized experience they need to broaden their horizons. Use this article to integrate technology tools and resources into your blended learning strategy while still catering to the specific needs of your corporate audience.



Selasa, 15 Maret 2022

PENGEMBANGAN MULTIMEDIA INTERAKTIF BERBASIS TEKNOLOGI AUGMENTED REALITY UNTUK PEMBELAJARAN IPA DI SEKOLAH DASAR

Abstract 

The purpose of this study is to develop an interactive multimedia based on augmented reality technology for science learning in elementary school, specifically for solar system introduction topic. The method used for this research was research and development (R&D). Instructional Design Model used for developing the interactive multimedia was MPI model. The study was conducted to the sixth grade students of SDN 06 Pontianak Kota who was in their second semester. The data for this researh was collected through direct observation, questionnaire, interview, documentary, and measurement technique. The collected data will be analysed using qualitative and quantitative methods. The results of the study shows that: 1) MPI model used as instructional design model for developing interactive multimedia, starting from identification stage, development, until formative evaluation stage has produced an instructional product in the form of interactive multimedia that is suitable for school learning activity; 2) implementation of interactive multimedia in the classroom is using a contextual learning model because the model is suitable to visualize and simulate most of abstract concepts; 3) the average score of student learning achievement before using interactive multimedia was 38% and categorized as "Failure", and after using interactive multimedia the students scored 84.4% or classified as "Excellent". Keywords: Interactive Multimedia, Augmented Reality, Science For Elementary School 


Sumber: Download PDF Complete


PENDAHULUAN 

Pembelajaran adalah proses interaksi yang terjadi antara guru, siswa, dan sumber belajar di dalam kelas atau lingkungan belajar lainnya, dalam rangka untuk mencapai suatu tujuan pembelajaran. Dalam suatu proses pembelajaran, peran guru lebih dominan sebagai fasilitator, dimana guru memberikan fasilitas belajar kepada para siswa agar menjadi aktor utama dalam kegiatan pembelajaran. Salah satu interaksi yang terjadi dalam proses pembelajaran adalah interaksi peserta didik atau pendidik pada sumber belajar. Sumber belajar yang sangat penting dan tidak dapat ditinggalkan dalam kegiatan belajar mengajar dari sejak dahulu adalah buku teks, modul ajar, dan sejenisnya. Selain buku teks, sering kali digunakan media bantu dalam pembelajaran, yang berfungsi untuk memudahkan guru atau siswa dalam menyampaikan atau menerima isi pesan suatu pelajaran. Media bantu ini biasa disebut media pembelajaran. Multimedia interaktif merupakan salah satu sarana yang banyak digunakan sebagai media pembelajaran berbasis komputer.

Maharani (2016: 7) menyatakan bahwa, berdasarkan observasi di lapangan, sekolah menggunakan bahan ajar berupa buku paket dan LKPD yang tidak melatih peserta didik untuk berinkuiri ilmiah. LKPD yang digunakan hanya berisi rangkuman dari suatu materi pelajaran dalam satu semester dan tidak menekankan peserta didik untuk menyelesaikan permasalahan. Ramli (2016) menyatakan bahwa, dalam proses belajar mengajar biasanya guru lebih banyak mendikte atau mencatat materi pelajaran di papan tulis, bahkan tidak menggunakan media atau alat bantu pembelajaran pada saat mengajar, sementara murid hanya mencatat dan menghafal informasi yang diperoleh. Sementara itu, Hera (2014) menerangkan bahwa beberapa masalah pembelajaran yang dihadapi di dalam kelas diantaranya adalah guru hanya menggunakan metode ceramah dan siswa hanya sebagai pendengar sehingga pelajaran terasa kurang menarik yang mengakibatkan siswa menjadi jenuh dan kurang memperhatikan. Jadi, berdasarkan hasil penelitian diatas, dapat diketahui bahwa di era yang serba modern ini, pembelajaran di sekolah-sekolah sering kali masih ditemui pembelajaran yang sifatnya monologis, interaksi yang terjadi dalam kegiatan pembelajaran hanya satu arah, yaitu dari guru ke siswa. Dialog yang terjadi antara siswa ke guru, siswa ke sumber belajar, dan sebaliknya minim terjadi.

            Pada kegiatan observasi yang peneliti lakukan, menunjukkan bahwa model awal pembelajaran yang diterapkan di SDN 06 Pontianak Kota masih bersifat konvensional, dimana dalam proses pembelajarannya metode ceramah sangat mendominasi. Siswa kurang berperan aktif dalam kegiatan pembelajaran dan cenderung pasif. Disamping itu, berdasarkan hasil wawancara kepada guru, terlihat bahwa sesungguhnya guru maupun siswa membutuhkan media pembelajaran terutama dalam bentuk multimedia interaktif yang berbasiskan komputer, agar terwujud kegiatan pembelajaran yang interaktif, efektif dan efisien. Hasil dokumentasi terhadap nilai murni siswa juga menunjukkan bahwa pemerolehan belajar siswa masih di bawah KKM, yang berarti penyerapan materi dalam model pembelajaran yang terdahulu belumlah maksimal.

Senin, 30 Agustus 2021

ESP-12E (ESP8266) Error : (rst cause:2, boot mode:(3,6))

Pada saat membuat program di ESP8266, ternyata terjadi error ketika board running (program berjalan), yaitu board esp8266 secara terus-menerus merestart atau reboot disaat akan menjalankan mode acccess point.

Setelah melakukan pengecekan, searching, trial & error, ternyata kesalahannya adalah jumlah karakter paasword tidak boleh lebih dari 7 karakter. Kemudian program pun berjalan dengan baik setelah jumlah karakter password diturunkkan menjadi maksimum 7 karakter. 

Untuk melihat proses troubleshooting dan hasilnya bisa tonton di linkk video berikut ini:

https://youtu.be/Bx9e1EBrybg


Jangan lupa untuk Like, Subscribe, Share, dan Comment.

Rabu, 14 Juli 2021

Sketch ESP8266 - Program Untuk Menguji Panel P10

 Kode Program:

/*
 * 
 * 

Pin on  DMD P10     GPIO      NODEMCU               Pin on  DS3231      NODEMCU                   Pin on  Buzzer       NODEMCU
        2  A        GPIO16    D0                            SCL         D1 (GPIO 5)                       +            RX (GPIO 3)
        4  B        GPIO12    D6                            SDA         D2 (GPIO 4)                       -            GND
        8  CLK      GPIO14    D5                            VCC         3V
        10 SCK      GPIO0     D3                            GND         GND
        12 R        GPIO13    D7
        1  NOE      GPIO15    D8
        3  GND      GND       GND

Catatan : 
o Perlu Power Eksternal 5V ke LED P10.


*/

  //Tambahan AB 1
#include <Wire.h>
#include <RtcDS3231.h>
RtcDS3231<TwoWire> Rtc(Wire);

#include <Timer.h>
#include <HJS589.h>

#include <fonts/ABLED_ArialRMTB10b_Hrfx7.h>
#include <fonts/ABLed_numTwCenMTCond25_5x16.h>
#include <fonts/ABLed_numTWMTCondes11b_5x7.h>

//----------------------------
// SETUP DMD HJS589
#define DISPLAYS_WIDE 3 //2 
#define DISPLAYS_HIGH 1
HJS589 Disp(DISPLAYS_WIDE, DISPLAYS_HIGH);  // Jumlah Panel P10 yang digunakan (KOLOM,BARIS)

//----------------------------------------------------------------------
// HJS589 P10 FUNGSI TAMBAHAN UNTUK NODEMCU ESP8266
void ICACHE_RAM_ATTR refresh() { 
  Disp.refresh();
  timer0_write(ESP.getCycleCount() + 80000);  
}

void Disp_init() {
  Disp.setDoubleBuffer(true);
  Disp.start();
  timer0_attachInterrupt(refresh);
  Disp.clear();
}

//SETUP RTC
//year, month, date, hour, min, sec and week-day(Senin 0 sampai Ahad 6)
//DateTime dt(2018, 12, 20, 16, 30, 0, 3);
RtcDateTime now;
//char weekDay[][7] = {"AHAD", "SENIN", "SELASA", "RABU", "KAMIS", "JUM'AT", "SABTU", "AHAD"}; // array hari, dihitung mulai dari senin, hari senin angka nya =0,
char weekDay[][7] = {"Ahad", "Senin", "Selasa", "Rabu", "Kamis", "Jum'at", "Sabtu", "Ahad"}; // array hari, dihitung mulai dari senin, hari senin angka nya =0,
//char monthYear[][4] = { "DES", "JAN", "FEB", "MAR", "APR", "MEI", "JUN", "JUL", "AGU", "SEP", "OKT", "NOV", "DES" };
char monthYear[][4] = { "12", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" };


//TIMER
Timer tBlink;
//----------------------------------------------------------------------
// SETUP

void setup() 
{
  Serial.begin(115200);

  //Buzzer
  pinMode(LED_BUILTIN, OUTPUT);
  delay(50);

  //RTC D3231

  int rtn = I2C_ClearBus(); // clear the I2C bus first before calling Wire.begin()
  if (rtn != 0) {
    Serial.println(F("I2C bus error. Could not clear"));
    if (rtn == 1) {
      Serial.println(F("SCL clock line held low"));
    } else if (rtn == 2) {
      Serial.println(F("SCL clock line held low by slave clock stretch"));
    } else if (rtn == 3) {
      Serial.println(F("SDA data line held low"));
    }
  } else { // bus clear, re-enable Wire, now can start Wire Arduino master
    Wire.begin();
  }
  
  Rtc.Begin();

  if (!Rtc.GetIsRunning()) 
  {
    Rtc.SetIsRunning(true);
  }
  
  Rtc.Enable32kHzPin(false);
  Rtc.SetSquareWavePin(DS3231SquareWavePin_ModeNone); 
  //Rtc.SetDateTime(RtcDateTime(2021, 1, 7, 17, 34, 00));
  Serial.println("Setup RTC selesai");
  
  //DMD
  Disp_init();
  Disp.setBrightness(80); //(20);

  //TIMER
  tBlink.oscillate(LED_BUILTIN, 500, HIGH);
}

//----------------------------------------------------------------------
// LOOP
void loop() {
  
  //tMain.update();
  tBlink.update();      

  Serial.println("tesSlash4()");
  
  lightAllPixel(1000);
  clearDisplay(1000);
  lightAllPixel(1000);
  clearDisplay(1000);
  lightAllPixel(4000);
  clearDisplay(1000);
  Disp.clear();
  tesSlash(40);
  tesBackSlash(40);
  clearDisplay(1000);

  tesSlash2(40);
  tesBackSlash2(40);
  tesHorLine(70);
  tesVertLine(70);

  //verticalLine(4000);
  
  //tesAllPixel();
  //delay(2000);
  //Disp.clear();
}

//----------------------------------------------------------------------
// ALARM SHOLAT BERJALAN SAAT MASUK WAKTU SHOLAT

void clearDisplay(int t)
{
  Disp.drawFilledRect(0,0,15,96,0);
  Disp.swapBuffers();
  delay(t);
}

void tesHorLine(int t)
{
  for (int y=0; y<18; y++)
  {
    Disp.drawLine(0,y,96,y,1);
    Disp.drawLine(0,y-1,96,y-1,0);
    Disp.drawLine(0,y-2,96,y-2,0);
    Disp.swapBuffers();
    delay(t);
  }
}

void tesVertLine(int t)
{
   for (int x=0; x<98; x++)
   {
      Disp.drawLine(x,0,x,15,1);
      Disp.drawLine(x-1,0,x-1,15,0);
      Disp.drawLine(x-2,0,x-2,15,0);
      Disp.swapBuffers();
      delay(t);
   }
}

void tesSlash(int t)
{
    int x;
    int y;
    
    for(int i=0; i<160; i=i+1)
    {
      y = 0;
      for (x=i; x>i-16; x--)
      {
        for (int c=0; c<16; c++)
        {
          if (c==0 || c==1 || c==4 || c==5 || c==8 || c==9 || c==12 || c==13)
          {
            Disp.setPixel(x-c,y,1);
          }
          else
          {
            Disp.setPixel(x-c,y,0);
          }
        }
        
        y++;
      }
      
      Disp.swapBuffers();
      delay(t);
    }    
}

void tesSlash2(int t)
{
    for(int x=0; x<113; x++)
    {
      Disp.drawLine(x,0,x-15,15,1);
      Disp.drawLine(x-1,0,x-15-1,15,0);
      Disp.drawLine(x-2,0,x-15-2,15,0);
  
      Disp.swapBuffers();
      delay(t);
    }
}

void tesBackSlash2(int t)
{
    for(int x=96; x>-64; x--)
    {
      Disp.drawLine(x,0,x+15,15,1);
      Disp.drawLine(x+1,0,x+15+1,15,0);
      Disp.drawLine(x+2,0,x+15+2,15,0);
  
      Disp.swapBuffers();
      delay(t);
    }
}

void tesBackSlash(int t)
{
    int x;
    int y;
    
    for(int i=96; i>-64; i=i-1)
    {
      y = 0;
      for (x=i; x<i+16; x++)
      {
        for (int c=0; c<16; c++)
        {
          if (c==0 || c==1 || c==4 || c==5 || c==8 || c==9 || c==12 || c==13)
          {
            Disp.setPixel(x+c,y,1);
          }
          else
          {
            Disp.setPixel(x+c,y,0);
          }
        }
        
        y++;
      }
      
      Disp.swapBuffers();
      delay(t);
    }
}


void lightAllPixel(int t)
{
  Disp.drawFilledRect(0,0,95,15,1);
  Disp.swapBuffers();
  delay(t);
}

//----------------------------------------------------------------------
// I2C_ClearBus menghindari gagal baca RTC (nilai 00 atau 165)

int I2C_ClearBus() {
  
#if defined(TWCR) && defined(TWEN)
  TWCR &= ~(_BV(TWEN)); //Disable the Atmel 2-Wire interface so we can control the SDA and SCL pins directly
#endif

  pinMode(SDA, INPUT_PULLUP); // Make SDA (data) and SCL (clock) pins Inputs with pullup.
  pinMode(SCL, INPUT_PULLUP);

  delay(2500);  // Wait 2.5 secs. This is strictly only necessary on the first power
  // up of the DS3231 module to allow it to initialize properly,
  // but is also assists in reliable programming of FioV3 boards as it gives the
  // IDE a chance to start uploaded the program
  // before existing sketch confuses the IDE by sending Serial data.

  boolean SCL_LOW = (digitalRead(SCL) == LOW); // Check is SCL is Low.
  if (SCL_LOW) { //If it is held low Arduno cannot become the I2C master. 
    return 1; //I2C bus error. Could not clear SCL clock line held low
  }

  boolean SDA_LOW = (digitalRead(SDA) == LOW);  // vi. Check SDA input.
  int clockCount = 20; // > 2x9 clock

  while (SDA_LOW && (clockCount > 0)) { //  vii. If SDA is Low,
    clockCount--;
  // Note: I2C bus is open collector so do NOT drive SCL or SDA high.
    pinMode(SCL, INPUT); // release SCL pullup so that when made output it will be LOW
    pinMode(SCL, OUTPUT); // then clock SCL Low
    delayMicroseconds(10); //  for >5uS
    pinMode(SCL, INPUT); // release SCL LOW
    pinMode(SCL, INPUT_PULLUP); // turn on pullup resistors again
    // do not force high as slave may be holding it low for clock stretching.
    delayMicroseconds(10); //  for >5uS
    // The >5uS is so that even the slowest I2C devices are handled.
    SCL_LOW = (digitalRead(SCL) == LOW); // Check if SCL is Low.
    int counter = 20;
    while (SCL_LOW && (counter > 0)) {  //  loop waiting for SCL to become High only wait 2sec.
      counter--;
      delay(100);
      SCL_LOW = (digitalRead(SCL) == LOW);
    }
    if (SCL_LOW) { // still low after 2 sec error
      return 2; // I2C bus error. Could not clear. SCL clock line held low by slave clock stretch for >2sec
    }
    SDA_LOW = (digitalRead(SDA) == LOW); //   and check SDA input again and loop
  }
  if (SDA_LOW) { // still low
    return 3; // I2C bus error. Could not clear. SDA data line held low
  }

  // else pull SDA line low for Start or Repeated Start
  pinMode(SDA, INPUT); // remove pullup.
  pinMode(SDA, OUTPUT);  // and then make it LOW i.e. send an I2C Start or Repeated start control.
  // When there is only one I2C master a Start or Repeat Start has the same function as a Stop and clears the bus.
  /// A Repeat Start is a Start occurring after a Start with no intervening Stop.
  delayMicroseconds(10); // wait >5uS
  pinMode(SDA, INPUT); // remove output low
  pinMode(SDA, INPUT_PULLUP); // and make SDA high i.e. send I2C STOP control.
  delayMicroseconds(10); // x. wait >5uS
  pinMode(SDA, INPUT); // and reset pins as tri-state inputs which is the default state on reset
  pinMode(SCL, INPUT);
  return 0; // all ok
}

Minggu, 04 April 2021